Skip to content
Snippets Groups Projects
Commit 2f843839 authored by Laurent's avatar Laurent
Browse files

hotline #15519 add Cyberlibris helper

parent 172f429f
Branches
Tags 7.9.17
4 merge requests!366Master,!364Master,!344Dev/15524,!339Hotline 6.50
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* AFI-OPAC 2.0 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).
*
* AFI-OPAC 2.0 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 AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class ZendAfi_View_Helper_TagCyberlibrisBook extends ZendAfi_View_Helper_TagRessourceNumerique {
use Trait_Translator;
public function tagCyberlibrisBook($album) {
$current_user = Class_Users::getIdentity();
if (!$this->canAccessRessourceNumerique())
return '<p>'.$this->_('Vous devez être connecté sous un compte avec abonnement valide pour pouvoir accéder au livre numérique').'</p>';
$url_book = 'http://www.bibliovox.com/'.Class_AdminVar::get('CYBERLIBRIS_ID').'?docid='. $album->getIdOrigine();
return '<a href="'.$url_book.'">Accéder au livre numérique</a>';
}
function hasRightAccesRessourcesNumeriques($user) {
return $user->hasRightAccessCyberlibris();
}
}
?>
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