diff --git a/VERSIONS_HOTLINE/54119 b/VERSIONS_HOTLINE/54119 new file mode 100644 index 0000000000000000000000000000000000000000..fb77c31d84e2c4df4afbf9b67dc65a63abda74e2 --- /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 ed8c27771ecfb265e4dd38cea835c18e633405bf..0707f65b069f60a20ea59b85f1a3ccabb5bea93a 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 cc75859b8a93c7b85f7ed6f0a137744a353df4a8..f882c3652651bf9a2709d5da36af3d1c14ead3b0 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")]]'); }