From c2403a4b6c2b858e93bbde22a33f648fafc93f8c Mon Sep 17 00:00:00 2001 From: Laurent Laffont <llaffont@afi-sa.fr> Date: Mon, 26 Nov 2018 12:07:31 +0100 Subject: [PATCH] dev #82369 fix basket domains link --- VERSIONS_WIP/82369 | 1 + library/ZendAfi/View/Helper/Panier/Table.php | 3 ++- public/admin/css/front_nav.css | 4 ++-- .../modules/opac/controllers/PanierControllerTest.php | 10 +++++++++- 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 VERSIONS_WIP/82369 diff --git a/VERSIONS_WIP/82369 b/VERSIONS_WIP/82369 new file mode 100644 index 00000000000..d221c40bdfd --- /dev/null +++ b/VERSIONS_WIP/82369 @@ -0,0 +1 @@ + - ticket #82369 : correction de l'affichage des liens vers les domaines des paniers \ No newline at end of file diff --git a/library/ZendAfi/View/Helper/Panier/Table.php b/library/ZendAfi/View/Helper/Panier/Table.php index 1cfb00cfbd2..7eb4a24533a 100644 --- a/library/ZendAfi/View/Helper/Panier/Table.php +++ b/library/ZendAfi/View/Helper/Panier/Table.php @@ -90,7 +90,8 @@ class ZendAfi_View_Helper_Panier_Table extends ZendAfi_View_Helper_BaseHelper { 'controller' => 'catalogue', 'action' => 'paniers', 'id_catalogue' => $catalogue->getId()], - $catalogue->getLibelle()); + $catalogue->getLibelle(), + ['class' => 'not_admin_tool']); $links = $this->view->tag('div', implode(', ', $catalogue_links)); } diff --git a/public/admin/css/front_nav.css b/public/admin/css/front_nav.css index 55186356e1d..0defe3a6c45 100644 --- a/public/admin/css/front_nav.css +++ b/public/admin/css/front_nav.css @@ -115,7 +115,7 @@ width: 270px; } -#site_web_wrapper[data-show_admin_icons="true"] a[href*="/admin"] { +#site_web_wrapper[data-show_admin_icons="true"] a[href*="/admin"]:not(.not_admin_tool) { display: inline-block !important; } @@ -135,7 +135,7 @@ #site_web_wrapper .footer a[href*="/admin"], #site_web_wrapper .admin_tools_lock, #site_web_wrapper .configuration_module, -#site_web_wrapper a[href*="/admin"] { +#site_web_wrapper a[href*="/admin"]:not(.not_admin_tool) { display: none !important; } diff --git a/tests/application/modules/opac/controllers/PanierControllerTest.php b/tests/application/modules/opac/controllers/PanierControllerTest.php index 8ae056dded8..7fcd93c9ff7 100644 --- a/tests/application/modules/opac/controllers/PanierControllerTest.php +++ b/tests/application/modules/opac/controllers/PanierControllerTest.php @@ -1833,7 +1833,15 @@ class PanierControllerDomainActionTest extends PanierControllerTestCase { /** @test */ public function tableShouldContainsSelectionJeunesse() { - $this->assertXPathContentContains('//div//table', 'selection jeunesse'); + $this->assertXPathContentContains('//div//table//td', + 'selection jeunesse'); + } + + + /** @test */ + public function domainLinkShouldHaveClassNotAdminTool() { + $this->assertXPathContentContains('//div//table//td//a[@class="not_admin_tool"]', + 'histoire'); } } -- GitLab