Skip to content
Snippets Groups Projects
Commit 8b0092dd authored by llaffont's avatar llaffont
Browse files

Affichage du lien réserver seulement pour type_doc <= DVD

parent 128a67e4
Branches
Tags
No related merge requests found
......@@ -22,7 +22,7 @@ $script_loader = Class_ScriptLoader::getInstance()
<div>
<a href="<?php echo $this->url($this->criteres_recherche->getUrlRetourListe(), null, true); ?>">&raquo;&nbsp;<?php echo $this->_('Retour à la liste') ?></a>
<span id="bloc_panier"><a href="<?php echo $this->url_panier ?>">&nbsp;&nbsp;&nbsp;&raquo;&nbsp;<?php echo $this->_('Ajouter au Panier') ?></a></span>
<span id="bloc_reserver"><?php echo $this->notice_LienReserver($this->notice->getId()); ?></span>
<span id="bloc_reserver"><?php echo $this->notice_LienReserver($this->notice); ?></span>
</div>
<div style="background:transparent url(<?php echo URL_IMG ?>separ.gif) repeat-x scroll center bottom; width:100%; height:5px; margin-bottom:5px"></div>
......
......@@ -197,7 +197,7 @@ class ZendAfi_View_Helper_ListeNotices extends ZendAfi_View_Helper_BaseHelper {
// Titre / auteur principal
$html.='<td class="'. $style_css .'" style="text-align:left;vertical-align:top;width:100%">';
$html.='<div style="float:right; width:auto">'.$this->view->notice_LienReserver($notice->getId()).'</div>';
$html.='<div style="float:right; width:auto">'.$this->view->notice_LienReserver($notice).'</div>';
$html.='<a href="'.$url_notice.'">';
$html.= $notice->getTitreEtSousTitre().BR.$notice->getAuteurPrincipal();
$html.='</a>';
......
......@@ -67,13 +67,17 @@ class ZendAfi_View_Helper_Notice_LienReserver extends Zend_View_Helper_HtmlEleme
}';
}
public function notice_LienReserver($id_notice) {
public function notice_LienReserver($notice) {
if ($notice->getTypeDoc() > Class_TypeDoc::DVD)
return '';
if (!$this->_script_added) {
Class_ScriptLoader::getInstance()->addInlineScript($this->getScriptDialog());
$this->_script_added = true;
}
return '<a class="reserver" href="#" onclick="openDialogExemplaires('.$id_notice.', $(this));return false">&nbsp;&nbsp;&nbsp;&raquo;&nbsp;'.$this->view->_('Réserver').'</a>';
return '<a class="reserver" href="#" onclick="openDialogExemplaires('.$notice->getId().', $(this));return false">&nbsp;&nbsp;&nbsp;&raquo;&nbsp;'.$this->view->_('Réserver').'</a>';
}
}
......
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