From 232ba76daf34d7a44570ad5eba447acae4b24e59 Mon Sep 17 00:00:00 2001 From: llaffont <llaffont@git-test.afi-sa.fr> Date: Thu, 17 Jan 2013 15:37:04 +0000 Subject: [PATCH] Ajout des informations de profil en classe de la balise <body> --- library/ZendAfi/Controller/Action/Helper/View.php | 4 ++-- .../opac/controllers/ProfilOptionsControllerTest.php | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/library/ZendAfi/Controller/Action/Helper/View.php b/library/ZendAfi/Controller/Action/Helper/View.php index a2fe18dc7d5..cad8aa44bd1 100644 --- a/library/ZendAfi/Controller/Action/Helper/View.php +++ b/library/ZendAfi/Controller/Action/Helper/View.php @@ -53,8 +53,8 @@ class ZendAfi_Controller_Action_Helper_View extends Zend_View { public function setModuleControllerActionNames($module, $controller, $action) { - $this->bodyParam = sprintf('class="%s_%s"', - $controller, $action); + $this->bodyParam = sprintf('class="%s_%s profil_%d"', + $controller, $action, Class_Profil::getCurrentProfil()->getId()); } diff --git a/tests/application/modules/opac/controllers/ProfilOptionsControllerTest.php b/tests/application/modules/opac/controllers/ProfilOptionsControllerTest.php index 4b739968920..25c47b222f1 100644 --- a/tests/application/modules/opac/controllers/ProfilOptionsControllerTest.php +++ b/tests/application/modules/opac/controllers/ProfilOptionsControllerTest.php @@ -426,6 +426,12 @@ class ProfilOptionsControllerProfilJeunesseViewPageJeuxTest extends ProfilOption } + /** @test */ + public function bodyClassShouldBeIndexIndexProfil12() { + $this->assertXPath('//body[@class="index_index profil_12"]'); + } + + /** @test */ public function titleShouldBeJeuxForPageJeux() { $this->assertQueryContentContains('head title', 'Jeux'); -- GitLab