Skip to content
Snippets Groups Projects
Commit ece3a6fe authored by efalcy's avatar efalcy
Browse files

Historique recherche vide : n'affiche pas "criteres de recherche"

parent 0ca5b852
Branches
Tags
No related merge requests found
......@@ -27,16 +27,20 @@ class ZendAfi_View_Helper_HistoriqueRecherche extends ZendAfi_View_Helper_BaseHe
$html='';
// Entete
$html .= '<h4>'.$this->view->_('Vos dernières recherches').'</h4>';
$this->_session = new Zend_Session_Namespace('historiqueRecherche');
if (!$this->_session->criteres)
return $html;
$html .= '<table style="width:100%"><tr> <th width="5%">&nbsp;</th>';
$html .= '<th width="45%%" align="left">'.$this->view->_('Expression recherchée').'</th></tr>
<tr><td colspan="4" style="background: transparent url(\'../images/separ.gif) repeat-x scroll center top\'">&nbsp;</td></tr>';
$this->_session = new Zend_Session_Namespace('historiqueRecherche');
$criteres_recherche = array_reverse($this->_session->criteres);
foreach($criteres_recherche as $critere)
{
$html.=$this->view->tagHistoriqueRecherche(unserialize($critere));
$html.=$this->view->tagHistoriqueRecherche(unserialize($critere))."";
}
return "<div class='criteres_recherche'>".$html."</table></div>";
}
......
......@@ -113,13 +113,18 @@ class ZendAfi_View_Helper_TagCriteresRecherche extends Zend_View_Helper_HtmlElem
$url=$this->_criteres_recherche->getUrlRetourListe();
$url['facettes']=implode('-', $facettes);
$url = array_filter($url);
$this->htmlAppend($libelle.'&nbsp;<a href="'.$this->view->url($url,null,true).'">Retirer</a>');
$this->htmlAppend('<a href="'.$this->view->url($url,null,true).'"><img src="'.URL_IMG.'suppression.gif" border="0">&nbsp;'.$libelle.'</a>');
}
public function visitCatalogue($catalogue) {
}
public function visitCoteDebutFin($cote_debut, $cote_fin) {
}
public function htmlAppend($text) {
$this->_html .= '<div>'.$text.'</div>';
return $this;
......
......@@ -27,7 +27,7 @@ class ZendAfi_View_Helper_TagHistoriqueRecherche extends ZendAfi_View_Helper_Tag
$this->_html='<tr style="cursor:pointer" onclick="document.location=\''.$url.'\'" title="'.$this->view->_(' cette recherche').'">'.'<td valign="top" style="text-align:center"><img src="'.URL_IMG.'bouton/loupe.gif" border="0" title="'.$this->view->_('Relancer cette recherche').'"></td><td>'.$this->_html;
return $this->_html."</td></tr>";
return $this->_html."<br/></td></tr>";
}
public function visitRubrique($rubrique,$fil) {
$codification = Class_Codification::getInstance();
......
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