From 3f1a9fe58de4260f7f92227526a8229044e4efe8 Mon Sep 17 00:00:00 2001 From: Laurent Laffont <llaffont@afi-sa.fr> Date: Tue, 17 Jan 2017 17:20:28 +0100 Subject: [PATCH] hotline #54119 user loans: add type doc header --- VERSIONS_HOTLINE/54119 | 1 + library/ZendAfi/View/Helper/Abonne/Loans.php | 9 ++------- .../opac/controllers/AbonneControllerPretsTest.php | 12 +++++++++--- 3 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 VERSIONS_HOTLINE/54119 diff --git a/VERSIONS_HOTLINE/54119 b/VERSIONS_HOTLINE/54119 new file mode 100644 index 00000000000..fb77c31d84e --- /dev/null +++ b/VERSIONS_HOTLINE/54119 @@ -0,0 +1 @@ + - ticket #54119 : liste des prêts, ajout de l'entête de la colonne 'Support' \ No newline at end of file diff --git a/library/ZendAfi/View/Helper/Abonne/Loans.php b/library/ZendAfi/View/Helper/Abonne/Loans.php index ed8c27771ec..0707f65b069 100644 --- a/library/ZendAfi/View/Helper/Abonne/Loans.php +++ b/library/ZendAfi/View/Helper/Abonne/Loans.php @@ -42,12 +42,7 @@ class ZendAfi_View_Helper_Abonne_Loans extends ZendAfi_View_Helper_BaseHelper { function($title) { return $this->_tag('th', $title); }, - [$this->_('Emprunté par'), - $this->_('Titre'), - $this->_('Auteur'), - $this->_in_progress ? $this->_('Bibliothèque') : $this->_('Date d\'emprunt'), - $this->_in_progress ? $this->_('Retour prévu') : $this->_('Date de retour'), - $this->_('Informations')]); + $this->_tableColumns()); return $this->_tag('thead', $this->_tag('tr', @@ -56,7 +51,7 @@ class ZendAfi_View_Helper_Abonne_Loans extends ZendAfi_View_Helper_BaseHelper { protected function _tableColumns() { - return [$this->_('n°'), + return [$this->_('Emprunté par'), $this->_('Support'), $this->_('Titre'), $this->_('Auteur'), diff --git a/tests/application/modules/opac/controllers/AbonneControllerPretsTest.php b/tests/application/modules/opac/controllers/AbonneControllerPretsTest.php index cc75859b8a9..f882c365265 100644 --- a/tests/application/modules/opac/controllers/AbonneControllerPretsTest.php +++ b/tests/application/modules/opac/controllers/AbonneControllerPretsTest.php @@ -333,11 +333,17 @@ class AbonneControllerPretsListThreePretsTest extends AbonneControllerPretsListT /** @test */ public function potterLoanShouldContainsTypeDocBook() { $this->assertXPathContentContains('//tbody/tr[2]//td[preceding-sibling::td[text()="Livres"]]', - 'Harry Potter and the deathly hallows', - $this->_response->getBody()); + 'Harry Potter and the deathly hallows'); } + /** @test */ + public function potterLoansTableHeaderShouldContainsSupport() { + $this->assertXPath('//table//th[text()="Titre"][preceding-sibling::th[1][text()="Support"]]'); + } + + + /** @test */ public function potterLibraryShouldBeAstrolab() { $this->assertXPathContentContains("//tbody/tr[2]//td", 'Astrolabe'); @@ -391,7 +397,7 @@ class AbonneControllerPretsListThreePretsTest extends AbonneControllerPretsListT } - /** @test */ + /** @test */ public function pnbLoansTableShouldNotDisplayTypeDoc() { $this->assertXPath('//table//th[text()="Titre"][preceding-sibling::th[1][not(text()="Support")]]'); } -- GitLab