diff --git a/VERSIONS b/VERSIONS index f184459dd916e9c824cf2b8ec5e79cbf62547c64..02156f01c34b3ef3dd7c14c27d5905de86cbaca3 100644 --- a/VERSIONS +++ b/VERSIONS @@ -1,3 +1,14 @@ +12/01/2017 - v7.7.25 - v7.7.26 + + - ticket #53371 : Fiche bibliothèque : affichage du lien 'voir le plan' lorsque le lieu est renseigné. + + - ticket #36347 : Compte lecteur : ajout de la colonne 'Support' dans la liste des prêts et des réservations. Amélioration du formatage de la liste des prêts PNB. + + - ticket #52819 : Administration : ajout d'une variable pour gérer l'affichage de la disponibilité dans le résultat de recherche calculé avec la facette "En rayon". + + - ticket #53372 : Administration : configuration de la boite calendrier : l'option du choix du mode d'affichage des titres n'apparaît que pour l'affichage "liste simple". + + 10/01/2017 - v7.7.24 - ticket #51334 : SIGB CDScript : Ajout du courriel et du numéro de carte dans le lien SSO diff --git a/VERSIONS_HOTLINE/53371 b/VERSIONS_HOTLINE/53371 deleted file mode 100644 index 2dd39fe16c852f0f30c0a35a7267657c690f934f..0000000000000000000000000000000000000000 --- a/VERSIONS_HOTLINE/53371 +++ /dev/null @@ -1 +0,0 @@ - - ticket #53371 : Fiche bibliothèque : affichage du lien 'voir le plan' lorsque le lieu est renseigné \ No newline at end of file diff --git a/VERSIONS_HOTLINE/53372 b/VERSIONS_HOTLINE/53372 deleted file mode 100644 index cfc4ad5efa782f64858db8b59bee870102686be1..0000000000000000000000000000000000000000 --- a/VERSIONS_HOTLINE/53372 +++ /dev/null @@ -1 +0,0 @@ - - ticket #53372 : Boite calendrier : l'option du choix du mode d'affichage des titres n'apparaît que pour l'affichage "liste simple" \ No newline at end of file diff --git a/application/modules/opac/views/scripts/abonne/prets.phtml b/application/modules/opac/views/scripts/abonne/prets.phtml index 332b242b68f9a507c566c90fd9791ff4b4d26568..32340c23b3c32c119d3a3a0a25d844b66500d253 100644 --- a/application/modules/opac/views/scripts/abonne/prets.phtml +++ b/application/modules/opac/views/scripts/abonne/prets.phtml @@ -35,7 +35,7 @@ echo $extend_all; if($this->user->hasPNB()) { echo $this->tag('h2', $this->_('Prêts numériques en cours')); - echo $this->abonne_Loans($this->user->getPNBLoans()); + echo $this->abonne_LoansPNB($this->user->getPNBLoans()); } $this->closeBoite(); diff --git a/library/Class/Loan/Pnb.php b/library/Class/Loan/Pnb.php index 7c02c98249fb1f115e058b83dc01ae3e1d4b9ffb..40cff9304f43e496041a23c534221c7d28bb6710 100644 --- a/library/Class/Loan/Pnb.php +++ b/library/Class/Loan/Pnb.php @@ -125,5 +125,10 @@ class Class_Loan_Pnb extends Storm_Model_Abstract { public function getType() { return ''; } + + + public function getIssueDate() { + return $this->getLoanDate(); + } } ?> \ 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 d417afdaa9496a8e961c3532e1bb279119ae1cf8..ed8c27771ecfb265e4dd38cea835c18e633405bf 100644 --- a/library/ZendAfi/View/Helper/Abonne/Loans.php +++ b/library/ZendAfi/View/Helper/Abonne/Loans.php @@ -42,7 +42,6 @@ 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'), @@ -56,6 +55,17 @@ class ZendAfi_View_Helper_Abonne_Loans extends ZendAfi_View_Helper_BaseHelper { } + protected function _tableColumns() { + return [$this->_('n°'), + $this->_('Support'), + $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')]; + } + + protected function renderLoans($loans) { $this->_line_no = 1; $html = ''; @@ -71,22 +81,24 @@ class ZendAfi_View_Helper_Abonne_Loans extends ZendAfi_View_Helper_BaseHelper { protected function renderLoan($loan) { - $notice_url = $loan->getTitre(); - - if ($loan->getNoticeOPACId()) - $notice_url = $this->view->tagAnchor($this->view->url( - ['controller' => 'recherche', - 'action' => 'viewnotice', - 'id' => $loan->getNoticeOPACId(), - 'retour_abonne' => 'prets'], - null, true), - $loan->getTitre()); + $record_title = $loan->getTitre(); + + if ($record = $loan->getNoticeOPAC()) + $record_title = $this->view->tagAnchor($this->view->url( + ['controller' => 'recherche', + 'action' => 'viewnotice', + 'id' => $record->getId(), + 'retour_abonne' => 'prets'], + null, true), + $loan->getTitre()); return $this->_tag('tr', $this->_tag('td', $loan->getUserFullName()) . $this->_tag('td', - $notice_url) + $record ? $record->getTypeDocLabel() : '') + . $this->_tag('td', + $record_title) . $this->_tag('td', $loan->getAuteur()) . $this->_tag('td', diff --git a/library/ZendAfi/View/Helper/Abonne/LoansPNB.php b/library/ZendAfi/View/Helper/Abonne/LoansPNB.php new file mode 100644 index 0000000000000000000000000000000000000000..bc5c9c0d35bb4f9a5ea6ee660768a8769b1c1d3f --- /dev/null +++ b/library/ZendAfi/View/Helper/Abonne/LoansPNB.php @@ -0,0 +1,63 @@ +<?php +/** + * Copyright (c) 2012-2014, Agence Française Informatique (AFI). All rights reserved. + * + * BOKEH is free software; you can redistribute it and/or modify + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by + * the Free Software Foundation. + * + * There are special exceptions to the terms and conditions of the AGPL as it + * is applied to this software (see README file). + * + * BOKEH is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE + * along with BOKEH; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +class ZendAfi_View_Helper_Abonne_LoansPNB extends ZendAfi_View_Helper_Abonne_Loans { + public function abonne_LoansPNB($loans, $in_progress = true) { + return parent::abonne_Loans($loans, $in_progress); + } + + + protected function _tableColumns() { + return [$this->_('n°'), + $this->_('Titre'), + $this->_('Auteur'), + $this->_('Date d\'emprunt'), + $this->_in_progress ? $this->_('Retour prévu') : $this->_('Date de retour')]; + } + + + protected function renderLoan($loan) { + $record_title = $loan->getTitre(); + + if ($record_id = $loan->getNoticeOPACId()) + $record_title = $this->view->tagAnchor($this->view->url( + ['controller' => 'recherche', + 'action' => 'viewnotice', + 'id' => $record_id, + 'retour_abonne' => 'prets'], + null, true), + $loan->getTitre()); + return + $this->_tag('tr', + $this->_tag('td', + $this->_line_no++) + . $this->_tag('td', + $record_title) + . $this->_tag('td', + $loan->getAuteur()) + . $this->_tag('td', + date('d/m/Y', strtotime($loan->getIssueDate()))) + . $this->_tag('td', + date('d/m/Y', strtotime($loan->getDateRetour())), + ['class' => 'date_retour'])); + } +} \ No newline at end of file diff --git a/library/ZendAfi/View/Helper/Abonne/ReservationsTable.php b/library/ZendAfi/View/Helper/Abonne/ReservationsTable.php index b1f6f27e05aaff8c436e1afbc5dc059f5b9c60a1..c80e1756fe30545fc958aedac1a2849fd65bc052 100644 --- a/library/ZendAfi/View/Helper/Abonne/ReservationsTable.php +++ b/library/ZendAfi/View/Helper/Abonne/ReservationsTable.php @@ -37,7 +37,9 @@ class ZendAfi_View_Helper_Abonne_ReservationsTable extends ZendAfi_View_Helper_B return $this->_tag('th', $title); }, + [$this->_('Réservé par'), + $this->_('Support'), $this->_('Titre'), $this->_('Auteur'), $this->_('Bibliothèque'), @@ -65,9 +67,12 @@ class ZendAfi_View_Helper_Abonne_ReservationsTable extends ZendAfi_View_Helper_B protected function _renderReservation($reservation) { + $record = $reservation->getNoticeOPAC(); + return $this->_tag('tr', $this->_tag('td', $reservation->getUserFullName()) + . $this->_tag('td', $record ? $record->getTypeDocLabel() : '') . $this->_tag('td', $this->_getRecordLink($reservation->getTitre(), $reservation->getNoticeOPACId())) . $this->_tag('td', diff --git a/library/startup.php b/library/startup.php index 5d1d102eb49b5f7d7f6f92ce4976e23a21ad8509..5ecb041c0366304a37a1350a31faf7556958ec9d 100644 --- a/library/startup.php +++ b/library/startup.php @@ -83,7 +83,7 @@ class Bokeh_Engine { function setupConstants() { defineConstant('BOKEH_MAJOR_VERSION','7.7'); - defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.24'); + defineConstant('BOKEH_RELEASE_NUMBER', BOKEH_MAJOR_VERSION . '.26'); defineConstant('BOKEH_REMOTE_FILES', 'http://git.afi-sa.fr/afi/opacce/'); diff --git a/tests/application/modules/opac/controllers/AbonneControllerPretsTest.php b/tests/application/modules/opac/controllers/AbonneControllerPretsTest.php index 0a27292581cb6787bb5723ed565744abb1eedb81..cc75859b8a93c7b85f7ed6f0a137744a353df4a8 100644 --- a/tests/application/modules/opac/controllers/AbonneControllerPretsTest.php +++ b/tests/application/modules/opac/controllers/AbonneControllerPretsTest.php @@ -124,6 +124,7 @@ abstract class AbonneControllerPretsListThreePretsTestCase extends AbstractAbonn 'notice' => $this->fixture('Class_Notice', ['id' => 889, 'titre_principal' => 'Potter', + 'type_doc' => 1, 'unimarc' => '00577nam0 2200181 450 001001500000010001800015100004100033101000800074200010700082210003000189215001100219461002000230606002900250676000800279700004500287801005600332940000700388frOr1314913787 a9781408812792 a20140320 0103 aEng1 aHarry Potter and the deathly hallowsdHarry Potter et les reliques de la mortfJoanne Kathleen Rowling aLondrescBloomsburyd2010 a831 p. 1tHarry Potterv7 aAnglais (langue)2Rameau a420 1aRowlingbJoanne Kathleenf1965-....4070 aFRbBibliothèque de l\'agglomération de Saint-Omer apm'])]); $alice = new Class_WebService_SIGB_Emprunt('13', new Class_WebService_SIGB_Exemplaire(456)); @@ -141,6 +142,7 @@ abstract class AbonneControllerPretsListThreePretsTestCase extends AbstractAbonn 'notice' => $this->fixture('Class_Notice', ['id' => 827, 'titre_principal' => 'Alice', + 'type_doc' => 1, 'unimarc' => '01175cam0 22002771 450 001001500000010003700015100004100052101000800093102000700101105001800108106000600126200009300132210002400225211001300249215006400262300002400326307002900350330027300379345001800652461005600670700001800726701003000744801003300774856008300807940000700890frOr0354235228 a978-2-35592-635-8bbr.d7,65 EUR a20140225d2014 | |0fre|0103||||ba afre aFR a 0||y| ar1 aAlice au royaume de TrèfleeCheshire cat Waltzh5fQuinRosegdessin Mamenosuke Fujimaru aPariscKi-oond2014 1a20140227 a1 vol. (164 p.)cillustrations en noir et blancd18 x 13 cm aTraduit du japonais aSens de lecture japonais aPerdue dans la forêt aux portes, Alice tombe nez à nez avec Ace. Devenue malgré elle la confidente du chevalier, elle ne sait comment repousser ses avances. Lorsque le chat du Cheshire, qui a assisté à la scène, intervient, la rencontre tourne à l\'affrontement. b9782355926358 1tAlice au royaume de Trèfle : Cheshire cat Waltzv5 1aQuinRose4070 1aFujimarubMamenosuke4440 aFRbElectrec20140225gAFNOR uhttp://www.electre.com//GetBlob.ashx?Ean=9782355926358,0-1913692&Size=Original aLR'])]); $emprunteur = new Class_WebService_SIGB_Emprunteur('1234', 'Florence'); @@ -151,6 +153,7 @@ abstract class AbonneControllerPretsListThreePretsTestCase extends AbstractAbonn 'subscriber_id' => $this->florence->getIdabon(), 'ongoing' => true, 'expected_return_date' => '2022-05-02T18:14:14+02:00', + 'loan_date' => '2016-06-13T15:10:02+02:00', 'album' => $this->fixture('Class_Album', ['id' => 4, 'notice_id' => 5, @@ -164,6 +167,7 @@ abstract class AbonneControllerPretsListThreePretsTestCase extends AbstractAbonn 'user_id' => $this->florence->getId(), 'ongoing' => true, 'expected_return_date' => '2020-01-01T18:14:14+02:00', + 'loan_date' => '2016-06-13T15:10:02+02:00', 'album' => $this->fixture('Class_Album', ['id' => 5, 'notice_id' => 6, @@ -327,8 +331,10 @@ class AbonneControllerPretsListThreePretsTest extends AbonneControllerPretsListT /** @test */ - public function potterLoanShouldBePresent() { - $this->assertXPathContentContains("//tbody/tr[2]//td", 'Potter', $this->_response->getBody()); + public function potterLoanShouldContainsTypeDocBook() { + $this->assertXPathContentContains('//tbody/tr[2]//td[preceding-sibling::td[text()="Livres"]]', + 'Harry Potter and the deathly hallows', + $this->_response->getBody()); } @@ -380,21 +386,28 @@ class AbonneControllerPretsListThreePretsTest extends AbonneControllerPretsListT /** @test */ public function pinocchioPnbLoanShouldBePresent() { $this->assertXPathContentContains('//tbody//a[contains(@href, "viewnotice/id/5")]', - 'Pinocchio'); + 'Pinocchio', + $this->_response->getBody()); + } + + + /** @test */ + public function pnbLoansTableShouldNotDisplayTypeDoc() { + $this->assertXPath('//table//th[text()="Titre"][preceding-sibling::th[1][not(text()="Support")]]'); } /** @test */ public function pinocchioPnbLoanReturnDateShouldBe2022() { $this->assertXPathContentContains('//tbody//td[@class="date_retour"]', - '2022-05-02T18:14:14+02:00'); + '02/05/2022'); } /** @test */ public function peterPanPnbLoanReturnDateShouldBe2020() { $this->assertXPathContentContains('//tbody//td[@class="date_retour"]', - '2020-01-01T18:14:14+02:00'); + '01/01/2020'); } } @@ -456,7 +469,8 @@ class AbonneControllerPretsListReservationTest extends AbstractAbonneControllerP $this->fixture('Class_Notice', ['id' => 820, - 'titre_principal' => 'Potter']); + 'titre_principal' => 'Potter', + 'type_doc' => Class_TypeDoc::DVD]); $this->fixture('Class_Notice', ['id' => 824, @@ -541,6 +555,11 @@ class AbonneControllerPretsListReservationTest extends AbstractAbonneControllerP } + /** @test */ + public function typeDogShouldBeDVD() { + $this->assertXPathContentContains('//tbody/tr[1]//td', 'DVD'); + } + /** @test */ public function etatShouldBeReservationEmise() { $this->assertXPathContentContains('//tbody/tr[1]//td', 'Réservation émise'); diff --git a/tests/library/ZendAfi/View/Helper/ListeNotices/VERSIONS_HOTLINE/52819 b/tests/library/ZendAfi/View/Helper/ListeNotices/VERSIONS_HOTLINE/52819 deleted file mode 100644 index c15823e7030714b37acc3b9c3bd2ba8230f9d5cf..0000000000000000000000000000000000000000 --- a/tests/library/ZendAfi/View/Helper/ListeNotices/VERSIONS_HOTLINE/52819 +++ /dev/null @@ -1 +0,0 @@ - - ticket #52819 : Administration : ajout d'une variable pour gérer l'affichage de la disponibilité dans le résultat de recherche calculé avec la facette "En rayon". \ No newline at end of file