Skip to content
Snippets Groups Projects
Commit 6b3b301f authored by llaffont's avatar llaffont
Browse files

Suppression des tables pour le résultat de recherche. On peut mettre les facettes à gauche par CSS

parent 9730e748
Branches
Tags
No related merge requests found
<?php
$preferences = $this->_current_module["preferences"];
$hasFacettes = (1 == $preferences["facettes_actif"]);
$hasTags = (1 == $preferences["tags_actif"]);
$hasFacettes = (1 == $preferences["facettes_actif"]) && $this->resultat['nombre'];
$hasTags = (1 == $preferences["tags_actif"]) && $this->resultat['nombre'];
$tagsPosition = $preferences["tags_position"];
extract($this->resultat);
if(!isset($facettes))
$facettes = [];
$facettes = [];
$this->openBoite($this->titre);
......@@ -15,47 +17,47 @@ if ($this->is_pertinence) {
}
?>
<div class="resultats_page">
<?php
echo $this->tagTriRecherche($this->criteres_recherche);
echo $this->tagTitreEtNombreDeResultats($nombre, $this->criteres_recherche);
echo $this->tagNombreDePages($page_cours);
if ($this->rubriques || $this->fil_ariane) {
echo $this->render('recherche/guidee.phtml');
} else {
echo $this->tagCriteresRecherche($this->criteres_recherche);
}
<?php
echo $this->tagTriRecherche($this->criteres_recherche);
echo $this->tagTitreEtNombreDeResultats($nombre, $this->criteres_recherche);
echo $this->tagNombreDePages($page_cours);
if ($this->rubriques || $this->fil_ariane) {
echo $this->render('recherche/guidee.phtml');
} else {
echo $this->tagCriteresRecherche($this->criteres_recherche);
}
?>
?>
<div class="recherche_actions">
<span>
<?php
echo $this->tagAnchor($this->url($this->criteres_recherche->getUrlRetourRechercheInitiale(), null, true),
sprintf('&raquo; %s',
$this->_('Retour à la recherche initiale')));?>
</span>
<?php if ($this->url_retour_notice) { ?>
<div class="recherche_actions">
<span>
<?php
echo $this->tagAnchor($this->url_retour_notice,
sprintf('&raquo; %s',
$this->_('Retour à la notice'))); ?>
</span>
<?php } ?>
<span>
<?php echo $this->tagAnchor($this->url($this->criteres_recherche->getUrlNouvelleRecherche(), null, true),
'&raquo; '.$this->_('Nouvelle recherche')); ?>
</span>
<span>
<?php if ((int)$preferences['suggestion_achat'] == 1)
echo $this->tagAnchor(['controller' => 'abonne', 'action' => 'suggestion-achat'],
'&raquo; '.$this->_('Suggérer un achat'));?>
</span>
</div>
<?php
echo $this->tagAnchor($this->url($this->criteres_recherche->getUrlRetourRechercheInitiale(), null, true),
sprintf('&raquo; %s',
$this->_('Retour à la recherche initiale')));?>
</span>
<?php if ($this->url_retour_notice) { ?>
<span>
<?php
echo $this->tagAnchor($this->url_retour_notice,
sprintf('&raquo; %s',
$this->_('Retour à la notice'))); ?>
</span>
<?php } ?>
<span>
<?php echo $this->tagAnchor($this->url($this->criteres_recherche->getUrlNouvelleRecherche(), null, true),
'&raquo; '.$this->_('Nouvelle recherche')); ?>
</span>
<span>
<?php if ((int)$preferences['suggestion_achat'] == 1)
echo $this->tagAnchor(['controller' => 'abonne', 'action' => 'suggestion-achat'],
'&raquo; '.$this->_('Suggérer un achat'));?>
</span>
</div>
</div>
<?php
......@@ -65,89 +67,61 @@ $this->closeBoite();
if (!isset($tags)) $tags=[];
?>
<?php if ($this->accessCVS) { ?>
<div style="width:100%;display:none" class="cvs_boite">
<?php
$this->openBoite($preferences['cvs_resultat_titre']);
$this->closeBoite();
?>
</div>
<?php
$this->openBoite($preferences['cvs_autres_resultats']);
<div style="width:100%;display:none" class="cvs_boite">
<?php
$this->openBoite($preferences['cvs_resultat_titre']);
$this->closeBoite();
}
?>
<div style="width:100%" class="conteneur_simple">
<?php
// Si facettes ou tags on ouvre un tableau a 2 colonnes
if ($hasFacettes or ($hasTags and (2 == $tagsPosition))) {
?>
<table class="resultat_recherche" style="width:100%">
<tr>
<td style="vertical-align:top;width: 65%">
<?php
}
// Liste notices
echo $this->listeNotices($this->liste,
$nombre,
$page_cours,
$preferences,
$this->criteres_recherche);
?>
<br/>
<div style="width:100%;text-align:center;">
</div>
<?php
echo $this->pager($nombre,
$preferences["liste_nb_par_page"],
$page_cours,
$this->url_retour);?>
</div>
<?php
// Tags sous la liste
if ($hasTags and (1 == $tagsPosition)) {
print(BR . $this->nuageTags($tags, $preferences["tags_codes"],$this->criteres_recherche));
$this->openBoite($preferences['cvs_autres_resultats']);
$this->closeBoite();
}
?>
// Facettes et tags sous les facettes
if ($hasFacettes or $hasTags) { ?>
</td>
<td style="vertical-align:top;width: 35%">
<?php
if ($nombre) {
if ($hasFacettes) { ?>
<div class="facette_outer" style="margin-left:10px;margin-top:17px">
<?php if ($preferences["facettes_message"]) { ?>
<h2><?php echo $preferences["facettes_message"];?></h2>
<?php } ?>
<?php echo $this->facettes($facettes, $preferences, $this->criteres_recherche); ?>
</div>
<?php
}
if ($hasTags and (2 == $tagsPosition)) { ?>
<div class="nuage_outer" style="margin-left:10px">
<?php if ($preferences["tags_message"]) { ?>
<h2><?php echo $preferences["tags_message"];?></h2>
<?php } ?>
<?php echo $this->nuageTags($tags, $preferences["tags_calcul"],$this->criteres_recherche); ?>
</div>
<?php
}
<?php
$html_liste_notices = $this->listeNotices($this->liste,
$nombre,
$page_cours,
$preferences,
$this->criteres_recherche);
$html_pager = $this->pager($nombre,
$preferences["liste_nb_par_page"],
$page_cours,
$this->url_retour);
$html_nuage_tags = '<div class="facette_outer" style="margin-left:10px;margin-top:17px">'.
($preferences["facettes_message"] ? ('<h2>'.$preferences["facettes_message"].'</h2>') : '').
$this->nuageTags($tags, $preferences["tags_codes"],$this->criteres_recherche).
'</div>';
$html_facettes = '<div class="facette_outer" style="margin-left:10px;margin-top:17px">'.
($preferences["facettes_message"] ? ('<h2>'.$preferences["facettes_message"].'</h2>') : '').
$this->facettes($facettes, $preferences, $this->criteres_recherche).
'</div>';
?>
<div style="width:100%" class="conteneur_simple">
<?php
if ($hasFacettes || $hasTags) {
echo '<div class="filtre_recherche">';
if ($hasTags && (1 == $tagsPosition)) echo $html_nuage_tags;
if ($hasFacettes) echo $html_facettes;
if ($hasTags && (2 == $tagsPosition)) echo $html_nuage_tags;
echo '</div>';
}
?>
</td>
</tr>
</table>
<?php } ?>
</div>
<?php Class_ScriptLoader::getInstance()
<div class="resultat_recherche">
<?php
echo $html_liste_notices;
echo $html_pager;
?>
</div>
</div>
<?php Class_ScriptLoader::getInstance()
->addOPACScript('recherche')
->addSkinStyleSheet('recherche'); ?>
......@@ -52,7 +52,7 @@ class ZendAfi_View_Helper_MoteurRecherche_Resultat_TimelineJsonVisitor extends Z
$this->_current_date = ['asset' => [],
'headline' =>
'<div>'.$this->view->tagAnchor($url_notice, $notice->getTitrePrincipal()).'</div>'.
'<div>'.$this->view->tagAnchor($url_notice, $notice->getAuteurPrincipal()).'</div>'
'<div>'.$notice->getAuteurPrincipal().'</div>'
];
$notice->acceptVisitor($this);
......
......@@ -1285,6 +1285,17 @@ body.abonne_multimedia-hold-view .actions a {
}
.filtre_recherche {
float: right;
width: 40%;
}
.resultat_recherche {
float: left;
width: 60%;
}
/** liste mur **/
.liste_mur {
......@@ -1486,6 +1497,11 @@ div.entete_notice {
padding-right: 120px;
}
.pager {
text-align: center;
margin-top: 5px;
}
.pager span {
padding-left:5px;
padding-right:5px
......
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