diff --git a/library/ZendAfi/View/Helper/HistoriqueRecherche.php b/library/ZendAfi/View/Helper/HistoriqueRecherche.php index c7b3ee376a4a17337b07786669ca43b5227e0d89..e74ba3e7558a5cd2e0a5feb22eea488840adbb5a 100644 --- a/library/ZendAfi/View/Helper/HistoriqueRecherche.php +++ b/library/ZendAfi/View/Helper/HistoriqueRecherche.php @@ -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%"> </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\'"> </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>"; } diff --git a/library/ZendAfi/View/Helper/TagCriteresRecherche.php b/library/ZendAfi/View/Helper/TagCriteresRecherche.php index 1bb1e0db52e139ae196e1f0ce53b60beeb5be610..f8a2c5116ee265f8c4ed607acbb0e4b8dc8814c7 100644 --- a/library/ZendAfi/View/Helper/TagCriteresRecherche.php +++ b/library/ZendAfi/View/Helper/TagCriteresRecherche.php @@ -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.' <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"> '.$libelle.'</a>'); } public function visitCatalogue($catalogue) { } + public function visitCoteDebutFin($cote_debut, $cote_fin) { + + } + + public function htmlAppend($text) { $this->_html .= '<div>'.$text.'</div>'; return $this; diff --git a/library/ZendAfi/View/Helper/TagHistoriqueRecherche.php b/library/ZendAfi/View/Helper/TagHistoriqueRecherche.php index e93f85f5ffaf80b7f6d4047f5145d87831c6e6aa..a10b39471e4049ff6c7806bbfdb883d684757c25 100644 --- a/library/ZendAfi/View/Helper/TagHistoriqueRecherche.php +++ b/library/ZendAfi/View/Helper/TagHistoriqueRecherche.php @@ -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();