Skip to content
Snippets Groups Projects
Commit ab35b792 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #14141 remove availability on digital resources

parent 9b3e9bcd
Branches
Tags
4 merge requests!2080Sandbox detach zf from storm,!2061Master,!1954Dev#14141 record availability on search result,!1949Dev#14141 record availability on search result
......@@ -32,18 +32,29 @@ abstract class ZendAfi_View_Helper_ListeNotices_Abstract extends ZendAfi_View_He
protected function _getDataAvailability($record) {
if(Class_AdminVar::isAfficherDispoSurRechercheEnabled())
return ['data-availability' => $record->getAvailabilityFromFacet()];
if(!$this->_isAllowedToDisplayAvailabilty($record))
return [];
return [];
return ['data-availability' => $record->getAvailabilityFromFacet()];
}
protected function _recordAvailability($record) {
if(Class_AdminVar::isAfficherDispoSurRechercheEnabled())
return $this->view->Notice_Availability($record);
if(!$this->_isAllowedToDisplayAvailabilty($record))
return '';
return $this->view->Notice_Availability($record);
}
protected function _isAllowedToDisplayAvailabilty($record) {
if(!Class_AdminVar::isAfficherDispoSurRechercheEnabled())
return false;
if($record->isRessourceNumerique())
return false;
return '';
return true;
}
......
......@@ -30,7 +30,10 @@ class Zendafi_View_Helper_Notice_Availability extends ZendAfi_View_Helper_BaseHe
protected function _getLibraries($record) {
if(!$libraries = $record->getAvailableLibrariesFromFacet())
return '';
return $this->_tag('div',
$this->_tag('p',
$this->_('Le document n\'est pas disponible')),
['class' => 'tooltip']);
$html = [];
foreach($libraries as $library)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment