diff --git a/library/ZendAfi/Controller/Action/Helper/View.php b/library/ZendAfi/Controller/Action/Helper/View.php index a89e93a476ebf3ef5a2e198cc54f691aeed16de0..315d52f6404f0402efab2c37db7320e6b9680633 100644 --- a/library/ZendAfi/Controller/Action/Helper/View.php +++ b/library/ZendAfi/Controller/Action/Helper/View.php @@ -30,7 +30,9 @@ class ZendAfi_Controller_Action_Helper_View extends Zend_View { private $ouverture_boite; // Html du haut de la boite private $fermeture_boite; // Html du bas de la boite - protected $_is_popup = false; + protected + $_is_popup = false, + $_first_subtitle = ''; public function __set($key, $val) { @@ -194,10 +196,19 @@ class ZendAfi_Controller_Action_Helper_View extends Zend_View { public function titreAdd($subtitle) { + if (!isset($this->_main_title)) + $this->_main_title = $subtitle; $this->titre = $this->getTitre() . ' - ' . $subtitle; } + public function getMainTitle() { + if (!isset($this->_main_title)) + return $this->titre; + return $this->_main_title; + } + + public function newForm($options = null) { return ZendAfi_Form::newWithOptions($options); diff --git a/library/ZendAfi/View/Helper/BarreNav.php b/library/ZendAfi/View/Helper/BarreNav.php index 73718e6614b72f85bbe370b1847371185bbed2bc..54a0bc3d49764bfc1b9337aafb691bc846e62138 100644 --- a/library/ZendAfi/View/Helper/BarreNav.php +++ b/library/ZendAfi/View/Helper/BarreNav.php @@ -36,8 +36,10 @@ class ZendAfi_View_Helper_BarreNav extends Zend_View_Helper_HtmlElement { foreach($links as $link) $html .= '<span>'.$this->view->tagAnchor($link['url'], $link['label']).'</span>'; - if ($current_action = $this->view->_current_module['preferences']['barre_nav']) - $html .= '<span>'.$current_action.'</span>'; +// if ($current_action = $this->view->_current_module['preferences']['barre_nav']) +// $html .= '<span>'.$current_action.'</span>'; + + $html .= '<span>'.$this->view->getMainTitle().'</span>'; return $html.'</div>'; } diff --git a/tests/application/modules/opac/controllers/AbonneControllerFormationsTest.php b/tests/application/modules/opac/controllers/AbonneControllerFormationsTest.php index 2e5e42930e98a56518cb47919654c0cc6b6dcaef..a80151b7866d06bbec266949cfa5ffa0b8ce7e1d 100644 --- a/tests/application/modules/opac/controllers/AbonneControllerFormationsTest.php +++ b/tests/application/modules/opac/controllers/AbonneControllerFormationsTest.php @@ -305,13 +305,6 @@ class AbonneControllerFormationsListTest extends AbstractAbonneControllerFormati } - /** @test */ - public function barreNavShouldContainsLesFormations() { - $this->assertXPathContentContains('//div[@class="barre_nav"]//span', - 'Les formations'); - } - - /** @test */ public function barreNavShouldContainsMonCompte() { $this->assertXPathContentContains('//div[@class="barre_nav"]//span//a[contains(@href, "index/index?id_profil=2")]',