From 0389c69bd4ce1445ae7b012d373176095992b6b8 Mon Sep 17 00:00:00 2001 From: gloas <gloas@afi-sa.fr> Date: Wed, 25 Jan 2017 11:45:42 +0100 Subject: [PATCH] hotline #14141 fix availability display --- VERSIONS_WIP/14141 | 1 + library/ZendAfi/View/Helper/ListeNotices/Abstract.php | 2 +- .../library/ZendAfi/View/Helper/ListeNotices/VignettesTest.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 VERSIONS_WIP/14141 diff --git a/VERSIONS_WIP/14141 b/VERSIONS_WIP/14141 new file mode 100644 index 00000000000..7a9e125159d --- /dev/null +++ b/VERSIONS_WIP/14141 @@ -0,0 +1 @@ + - ticket #14141 : correction de l'affichage de la disponibilité calculé par la facette dans les listes de documents. \ No newline at end of file diff --git a/library/ZendAfi/View/Helper/ListeNotices/Abstract.php b/library/ZendAfi/View/Helper/ListeNotices/Abstract.php index fd360f5fbe0..973abdce53a 100644 --- a/library/ZendAfi/View/Helper/ListeNotices/Abstract.php +++ b/library/ZendAfi/View/Helper/ListeNotices/Abstract.php @@ -32,7 +32,7 @@ abstract class ZendAfi_View_Helper_ListeNotices_Abstract extends ZendAfi_View_He protected function _getDataAvailability($record) { - if(!$this->_isAllowedToDisplayAvailabilty($record)) + if(!$this->_isAllowedToDisplayAvailabiltyFromFacet($record)) return []; return ['data-availability' => $record->getAvailabilityFromFacet()]; diff --git a/tests/library/ZendAfi/View/Helper/ListeNotices/VignettesTest.php b/tests/library/ZendAfi/View/Helper/ListeNotices/VignettesTest.php index f3c7d475bf5..db50507cc72 100644 --- a/tests/library/ZendAfi/View/Helper/ListeNotices/VignettesTest.php +++ b/tests/library/ZendAfi/View/Helper/ListeNotices/VignettesTest.php @@ -26,7 +26,7 @@ class VignettesRGAATest extends ViewHelperTestCase { public function setUp() { parent::setUp(); $this->fixture('Class_AdminVar', ['id'=>'AFFICHER_DISPONIBILITE_SUR_RECHERCHE_MODE_FACETTE', 'valeur'=>1] ); - $this->fixture('Class_AdminVar', ['id'=>'AFFICHER_DISPONIBILITE_SUR_RECHERCHE', 'valeur'=>1] ); + $this->fixture('Class_AdminVar', ['id'=>'AFFICHER_DISPONIBILITE_SUR_RECHERCHE', 'valeur'=>0] ); defineConstant('PATH_SKIN', './public/opac/skins/original/'); $helper = new ZendAfi_View_Helper_ListeNotices_Vignettes(); -- GitLab