diff --git a/application/modules/opac/views/scripts/recherche/avancee.phtml b/application/modules/opac/views/scripts/recherche/avancee.phtml index 693a862ac68db2d5cffaa525f664bb7840aaaf1c..c335ba0ed654073cc282839d2a59777818aad847 100644 --- a/application/modules/opac/views/scripts/recherche/avancee.phtml +++ b/application/modules/opac/views/scripts/recherche/avancee.phtml @@ -11,9 +11,9 @@ if ($this->statut == "saisie") { <tr> <td> <select name="operateur_titres" style="width:50px"> - <option value="and" <?php if ($this->operateur_titres == "and") print('selected="selected"'); ?>><?php echo $this->_('et'); ?></option> - <option value="or" <?php if ($this->operateur_titres == "or") print('selected="selected"'); ?>><?php echo $this->_('ou'); ?></option> - <option value="and not" <?php if ($this->operateur_titres == "and not") print('selected="selected"'); ?>><?php echo $this->_('sauf'); ?></option> + <option value="and" <?php if ($this->criteres_recherche->getParam('operateur_titres') == "and") print('selected="selected"'); ?>><?php echo $this->_('et'); ?></option> + <option value="or" <?php if ($this->criteres_recherche->getParam('operateur_titres') == "or") print('selected="selected"'); ?>><?php echo $this->_('ou'); ?></option> + <option value="and not" <?php if ($this->criteres_recherche->getParam('operateur_titres') == "and not") print('selected="selected"'); ?>><?php echo $this->_('sauf'); ?></option> </select> </td> <td><?php echo $this->_('Titres') ?></td> @@ -22,9 +22,9 @@ if ($this->statut == "saisie") { <tr> <td> <select name="operateur_auteurs" style="width:50px"> - <option value="and" <?php if ($this->operateur_auteurs == "and") print('selected="selected"'); ?>><?php echo $this->_('et'); ?></option> - <option value="or" <?php if ($this->operateur_auteurs == "or") print('selected="selected"'); ?>><?php echo $this->_('ou'); ?></option> - <option value="and not" <?php if ($this->operateur_auteurs == "and not") print('selected="selected"'); ?>><?php echo $this->_('sauf'); ?></option> + <option value="and" <?php if ($this->criteres_recherche->getParam('operateur_auteurs') == "and") print('selected="selected"'); ?>><?php echo $this->_('et'); ?></option> + <option value="or" <?php if ($this->criteres_recherche->getParam('operateur_auteurs') == "or") print('selected="selected"'); ?>><?php echo $this->_('ou'); ?></option> + <option value="and not" <?php if ($this->criteres_recherche->getParam('operateur_auteurs') == "and not") print('selected="selected"'); ?>><?php echo $this->_('sauf'); ?></option> </select> </td> <td><?php echo $this->_('Auteurs'); ?></td> @@ -33,9 +33,9 @@ if ($this->statut == "saisie") { <tr> <td> <select name="operateur_matieres" style="width:50px"> - <option value="and" <?php if ($this->operateur_matieres == "and") print('selected="selected"'); ?>><?php echo $this->_('et'); ?></option> - <option value="or" <?php if ($this->operateur_matieres == "or") print('selected="selected"'); ?>><?php echo $this->_('ou'); ?></option> - <option value="and not" <?php if ($this->operateur_matieres == "and not") print('selected="selected"'); ?>><?php echo $this->_('sauf'); ?></option> + <option value="and" <?php if ($this->criteres_recherche->getParam('operateur_matieres') == "and") print('selected="selected"'); ?>><?php echo $this->_('et'); ?></option> + <option value="or" <?php if ($this->criteres_recherche->getParam('operateur_matieres') == "or") print('selected="selected"'); ?>><?php echo $this->_('ou'); ?></option> + <option value="and not" <?php if ($this->criteres_recherche->getParam('operateur_matieres') == "and not") print('selected="selected"'); ?>><?php echo $this->_('sauf'); ?></option> </select> </td> <td><?php echo $this->_('Sujets'); ?></td> @@ -44,9 +44,9 @@ if ($this->statut == "saisie") { <tr> <td> <select name="operateur_dewey" style="width:50px"> - <option value="and" <?php if ($this->operateur_dewey == "and") print('selected="selected"'); ?>><?php echo $this->_('et'); ?></option> - <option value="or" <?php if ($this->operateur_dewey == "or") print('selected="selected"'); ?>><?php echo $this->_('ou'); ?></option> - <option value="and not" <?php if ($this->operateur_dewey == "and not") print('selected="selected"'); ?>><?php echo $this->_('sauf'); ?></option> + <option value="and" <?php if ($this->criteres_recherche->getParam('operateur_dewey') == "and") print('selected="selected"'); ?>><?php echo $this->_('et'); ?></option> + <option value="or" <?php if ($this->criteres_recherche->getParam('operateur_dewey') == "or") print('selected="selected"'); ?>><?php echo $this->_('ou'); ?></option> + <option value="and not" <?php if ($this->criteres_recherche->getParam('operateur_dewey') == "and not") print('selected="selected"'); ?>><?php echo $this->_('sauf'); ?></option> </select> </td> <td><?php echo $this->_("Centres d'intérêt"); ?></td> @@ -55,9 +55,9 @@ if ($this->statut == "saisie") { <tr> <td> <select name="operateur_editeur" style="width:50px"> - <option value="and" <?php if ($this->operateur_editeur == "and") print('selected="selected"'); ?>><?php echo $this->_('et'); ?></option> - <option value="or" <?php if ($this->operateur_editeur == "or") print('selected="selected"'); ?>><?php echo $this->_('ou'); ?></option> - <option value="and not" <?php if ($this->operateur_editeur == "and not") print('selected="selected"'); ?>><?php echo $this->_('sauf'); ?></option> + <option value="and" <?php if ($this->criteres_recherche->getParam('operateur_editeur') == "and") print('selected="selected"'); ?>><?php echo $this->_('et'); ?></option> + <option value="or" <?php if ($this->criteres_recherche->getParam('operateur_editeur') == "or") print('selected="selected"'); ?>><?php echo $this->_('ou'); ?></option> + <option value="and not" <?php if ($this->criteres_recherche->getParam('operateur_editeur') == "and not") print('selected="selected"'); ?>><?php echo $this->_('sauf'); ?></option> </select> </td> <td><?php echo $this->_('Editeur'); ?></td> @@ -66,9 +66,9 @@ if ($this->statut == "saisie") { <tr> <td> <select name="operateur_collection" style="width:50px"> - <option value="and" <?php if ($this->operateur_collection == "and") print('selected="selected"'); ?>><?php echo $this->_('et'); ?></option> - <option value="or" <?php if ($this->operateur_collection == "or") print('selected="selected"'); ?>><?php echo $this->_('ou'); ?></option> - <option value="and not" <?php if ($this->operateur_collection == "and not") print('selected="selected"'); ?>><?php echo $this->_('sauf'); ?></option> + <option value="and" <?php if ($this->criteres_recherche->getParam('operateur_collection') == "and") print('selected="selected"'); ?>><?php echo $this->_('et'); ?></option> + <option value="or" <?php if ($this->criteres_recherche->getParam('operateur_collection') == "or") print('selected="selected"'); ?>><?php echo $this->_('ou'); ?></option> + <option value="and not" <?php if ($this->criteres_recherche->getParam('operateur_collection') == "and not") print('selected="selected"'); ?>><?php echo $this->_('sauf'); ?></option> </select> </td> <td><?php echo $this->_('Collection'); ?></td> diff --git a/library/Class/CriteresRecherche.php b/library/Class/CriteresRecherche.php index d16b5c2e617877c74c631491a96644fd6c17ee58..281d2f5f1323f4f0769be2401156596f42d61304 100644 --- a/library/Class/CriteresRecherche.php +++ b/library/Class/CriteresRecherche.php @@ -41,14 +41,20 @@ class Class_CriteresRecherche { 'tri' => 'Trié par', 'id_catalogue' => "Catalogue", 'id_panier' => "Panier", - 'retour_panier' => "Panier" - + 'retour_panier' => "Panier", + 'operateur_editeur'=> "op editeur", + 'operateur_titres'=> '', + 'operateur_auteurs'=> '', + 'operateur_matieres' => '', + 'operateur_dewey'=>'', + 'operateur_editeur'=>'', + 'operateur_collection'=>'' ]; public function __construct() { $this->_profil = Class_Profil::getCurrentProfil(); } public function getValidParameters() { - return array_merge(array_keys(self::$criteres), [ 'filtres','id_user','id_module', 'facette','facettes', 'operateur_titres','operateur_auteurs','operateur_matieres','operateur_dewey','operateur_editeur','operateur_collection','code_rebond','pertinence','type_recherche','section','annexe','geo_zone','fil','bib_select']); + return array_merge(array_keys(self::$criteres), [ 'filtres','id_user','id_module', 'facette','facettes','code_rebond','pertinence','type_recherche','section','annexe','geo_zone','fil','bib_select']); } public function getListeTris() { diff --git a/library/ZendAfi/View/Helper/HistoriqueRecherche.php b/library/ZendAfi/View/Helper/HistoriqueRecherche.php index c0915dca01067d1ad33513f1142ff0702220212e..c7b3ee376a4a17337b07786669ca43b5227e0d89 100644 --- a/library/ZendAfi/View/Helper/HistoriqueRecherche.php +++ b/library/ZendAfi/View/Helper/HistoriqueRecherche.php @@ -32,7 +32,7 @@ class ZendAfi_View_Helper_HistoriqueRecherche extends ZendAfi_View_Helper_BaseHe <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 = $this->_session->criteres; + $criteres_recherche = array_reverse($this->_session->criteres); foreach($criteres_recherche as $critere) {