diff --git a/VERSIONS_HOTLINE/133092 b/VERSIONS_HOTLINE/133092 new file mode 100644 index 0000000000000000000000000000000000000000..3e364a4ec59b143b452d2f4ef0eb39d93b58904e --- /dev/null +++ b/VERSIONS_HOTLINE/133092 @@ -0,0 +1 @@ + - ticket #133092 : Administration : le lien "retour au site" utilise l'URL personnalisée du profil courant \ No newline at end of file diff --git a/library/ZendAfi/View/Helper/Admin/Nav.php b/library/ZendAfi/View/Helper/Admin/Nav.php index d1eb5defd361bbafe2fdab61ccf9b17afdf879ae..1b8b5aeb4e1b707dfe82cecddae70a17c4e5539d 100644 --- a/library/ZendAfi/View/Helper/Admin/Nav.php +++ b/library/ZendAfi/View/Helper/Admin/Nav.php @@ -50,7 +50,7 @@ class ZendAfi_View_Helper_Admin_Nav extends ZendAfi_View_Helper_BaseHelper { ['icon' => 'back_to_front', 'label' => $this->_('Retour au site'), 'title' => $this->_('Retourner sur la partie publique du portail'), - 'url' => $this->view->url(['id_profil' => Class_Profil::getCurrentProfil()->getId()], null, true)], + 'url' => Class_Profil::getCurrentProfil()->getUrl()], ['icon' => 'identity', 'label' => $identity->getLogin() . ' (' . $identity->getLibelleRole() . ')', diff --git a/tests/application/modules/admin/controllers/IndexControllerTest.php b/tests/application/modules/admin/controllers/IndexControllerTest.php index 26dac1e4cf6aca39b1ac81943e3692d2eed8ed16..df84ae729b399df6287902d30d37950808fe1fcd 100644 --- a/tests/application/modules/admin/controllers/IndexControllerTest.php +++ b/tests/application/modules/admin/controllers/IndexControllerTest.php @@ -126,6 +126,12 @@ class Admin_IndexControllerTest extends Admin_IndexControllerTestCase { Class_BokehVersion::setWebClient($mock_http); + $this->fixture(Class_Profil::class, + ['id' => 4, + 'libelle' => 'ludotek', + 'rewrite_url' => 'ludotek']) + ->beCurrentProfil(); + $this->dispatch('/admin/index/index', true); } @@ -173,6 +179,12 @@ class Admin_IndexControllerTest extends Admin_IndexControllerTestCase { } + /** @test */ + public function menuBackToSiteLinkShouldBeSlashLudotek() { + $this->assertXPathContentContains('//div[@class="menu barre_nav"]//a[text()="Retour au site"]/@href', '/ludotek'); + } + + /** @test */ public function linkToGoogleGroupShouldBePresent() { $this->assertXPathContentContains('//a[contains(@href, "utilisateurs-bokeh")]', 'Google group Bokeh');