Skip to content
Snippets Groups Projects
Commit 2b893ef6 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #64573 add skin try action

parent a4f9c41a
7 merge requests!2767Hotline,!2742Dev#64573 amelioration de la charte modele,!2724Dev#64573 amelioration de la charte modele,!2718Dev#64573 amelioration de la charte modele,!2679Dev#64573 amelioration de la charte modele,!2439WIP Dev#64573 amelioration de la charte modele,!2429Dev#64573 amelioration de la charte modele
Pipeline #2423 passed with stage
in 20 minutes and 33 seconds
......@@ -24,4 +24,10 @@ class Admin_SkinController extends ZendAfi_Controller_Action {
public function indexAction() {
$this->view->titre = $this->_('Essayer une autre charte graphique');
}
public function tryAction() {
Class_Profil::setCurrentProfil(Class_Profil::find($this->_getParam('on')));
$this->_forward('index', 'index', 'opac');
}
}
\ No newline at end of file
<?php
(new Class_Profil())->getAvailableSkins();
//(new Class_Profil())->getAvailableSkins();
echo $this->tagPreview(Class_Url::relative('/admin/skin/try/skin/evolution/on/1'),
$this->_('Essayer la charte Evolution'));
?>
\ No newline at end of file
......@@ -31,4 +31,21 @@ class SkinControllerIndexDispatchTest extends Admin_AbstractControllerTestCase {
public function evolutionSkinShouldBePresent() {
$this->assertXPathContentContains('//div', 'Evolution');
}
}
class SkinControllerTryDispatchTest extends Admin_AbstractControllerTestCase {
public function setUp() {
parent::setUp();
$this->dispatch('/admin/skin/try/skin/evolution/on/1?iframe=true&width=95%25&height=95%25', true);
}
/** @test */
public function shouldForwardToBokehIndex() {
$this->assertXPath('//body[contains(@class, "opac")]');
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment