/trunk/squelettes/css/cel_consultation.css |
---|
56,6 → 56,14 |
height: 600px; |
} |
/* =========================== Aide ============================ */ |
#ref-rech-opt-txt td, th { |
border: 1px solid #36560B; |
padding: 7px 5px; |
} |
/* =========================== Résultats ============================ */ |
.images_liste li { |
108,11 → 116,11 |
/* ============ Pagination =============================================== */ |
#page_courante { |
.page_courante { |
font-size: 1.5em; |
} |
#page_courante a { |
.page_courante a { |
color: black; |
} |
136,4 → 144,5 |
h4.lien_pliage:hover { |
cursor: pointer; |
} |
} |
/trunk/squelettes/formulaires/image_recherche.tpl.html |
---|
1,8 → 1,8 |
<!-- CEL_CONSULTATION - DEBUT RECHERCHE IMAGE --> |
<div id="recherche_image"> |
<h2> Recherche d'une image </h2> |
<form method="get" action="?module=Image&action=rechercherImage" id="form_recherche_image"> |
<label for="individu_nom">Recherche :</label> |
<form method="get" action="?module=Image&action=rechercherImage" id="form_recherche_image"> |
<label for="image_recherche">Recherche :</label> |
<input type="text" name="image_recherche" id="image_recherche" value="<?= $criteres ?>" /> |
<input type="hidden" id="module" name="module" value="Image" /> |
<input type="hidden" id="action" name="action" value="rechercherImage" /> |
10,4 → 10,87 |
</form> |
</div> |
<hr style="clear:both;visibility:hidden;" /> |
<a href="#" id="afficher_cacher_aide"> Afficher l'aide </a> |
<div style="display: block;" id="ref-rech-opt"> |
<h2 id="ref-rech-opt-titre">Options de recherche</h2> |
<div id="ref-rech-opt-txt"> |
<p> |
La recherche avancée permet de préciser la requête en associant des opérateurs au(x) terme(s) recherché(s). Les opérateurs sont listés dans |
le tableau ci-dessous. <br /> |
</p> |
<table class="largeur-14"> |
<thead> |
<tr> |
<th class="largeur-01">Opérateur</th> |
<th class="largeur-10">Signification</th> |
<th class="largeur-03">Exemples</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>taxon:</td> |
<td>Nom scientifique ou une partie de nom</td> |
<td><a href="http://www.tela-botanica.org/page:cel_galerie?module=Image&action=rechercherImage&image_recherche=taxon:Ornithogalum%2520umbellatum%2520L.">taxon:Ornithogalum umbellatum L.</a></td> |
</tr> |
<tr> |
<td>commune:</td> |
<td>Commune</td> |
<td><a href="http://www.tela-botanica.org/page:cel_galerie?image_recherche=Montpellier&module=Image&action=rechercherImage">commune:Montpellier</a></td> |
</tr> |
<tr> |
<td>departement:</td> |
<td>Code de departement sur 2 chiffres</td> |
<td><a href="http://www.tela-botanica.org/page:cel_galerie?image_recherche=departement%3A34&module=Image&action=rechercherImage">departement:34</a></td> |
</tr> |
<tr> |
<td>auteur:</td> |
<td>Email de l'auteur de l'observation</td> |
<td><a href="http://www.tela-botanica.org/page:cel_galerie?image_recherche=auteur%3Ajpm%40tela-botanica.org&module=Image&action=rechercherImage">auteur:jpm@tela-botanica.org</a></td> |
</tr> |
</tbody> |
</table> |
<p> |
Pour chacune des recherches mentionnées, vous pouvez entrer un mot entier ou bien une partie de mot (ex. commune:Montpellier ou commune:Mont) afin d'élargir les résultats |
</p> |
<p> |
Pour faire une recherche croisée, séparez les criteres uniquement par un + (sans espaces).<br /> |
<em>Exemple :</em> |
<a href="http://www.tela-botanica.org/page:cel_galerie?image_recherche=taxon%3ATrifolium%2Bdepartement%3A34&module=Image&action=rechercherImage">taxon:Trifolium+departement:34</a> |
<br /><br /><br /> |
Des "jokers" permettent d'élargir la recherche. |
</p> |
<table class="largeur-14"> |
<thead> |
<tr> |
<th class="largeur-01">Joker</th> |
<th class="largeur-10">Explication</th> |
<th class="largeur-03">Exemples</th> |
</tr> |
</thead> |
<tbody> |
<tr> |
<td>%</td> |
<td>Remplace n'importe quel nombre de caractères, y compris aucun.</td> |
<td><a href="http://www.tela-botanica.org/page:cel_galerie?image_recherche=%25ignan&module=Image&action=rechercherImage"> |
%ignan</a></td> |
</tr> |
<tr> |
<td>_</td> |
<td>Remplace exactement un caractère (possibilité d'en mettre plusieurs à la suite)</td> |
<td><a href="http://www.tela-botanica.org/page:cel_galerie?image_recherche=____ignan&module=Image&action=rechercherImage">____ignan</a></td> |
</tr> |
</tbody> |
</table> |
</div> |
</div> |
<hr style="clear:both;visibility:hidden;" /> |
<!-- CEL_CONSULTATION - FIN RECHERCHE IMAGE --> |
/trunk/squelettes/js/consultation.js |
---|
47,9 → 47,28 |
$("img").lazyload(); |
} |
function initialiserPanneauRechercheAvancee() { |
$("#afficher_cacher_aide").bind('click', function() { |
if($("#ref-rech-opt").is(':visible')) { |
$('#ref-rech-opt').slideUp('slow', function() { |
$("#afficher_cacher_aide").html("Afficher l'aide") |
}); |
} else { |
$('#ref-rech-opt').slideDown('slow', function() { |
$("#afficher_cacher_aide").html("Cacher l'aide"); |
}); |
} |
}); |
$("#ref-rech-opt").hide(); |
} |
$(document).ready(function() { |
reparerLiensDD(); |
initialiserZoom(); |
initialiserElementsPliables(); |
initialiserPanneauRechercheAvancee(); |
initialiserLazyLoading(); |
}); |
/trunk/squelettes/navigation/pagination.tpl.html |
---|
9,10 → 9,10 |
<?php } ?> |
<?php if($nb_pages > 1) { ?> |
<span id="pages"> |
<span class="pages"> |
<?php for($i = $pages_debut_intervalle; ($i < $pages_debut_intervalle+$pages_taille_intervalle) && $i <= $nb_pages ; $i++) : ?> |
<?php if($page_en_cours == $i) { ?> |
<span id="page_courante"> |
<span class="page_courante"> |
<?php } else { ?> |
<span> |
<?php } ?> |
/trunk/squelettes/listes/image_liste.tpl.html |
---|
15,23 → 15,22 |
<!-- BEGIN TB_IMG --> |
<li class="conteneur_image_deplie"> |
<a class="lien_voir_image" rel="galerie_image_cel" href="<?= $image['url_image_l']; ?>" title=" |
Taxon : <?= $image['nom_ret'] ?>, |
Taxon : <?= aControleur::convertirChaineTaxonPourAffichage($image['nom_ret']) ?>, |
Localisation : <?= $image['location'].' ('.$image['id_location'].')'; ?>, |
Transmis le : <?= $image['date_transmission'] ?><br />" alt=" |
Taxon : <?= $image['nom_ret'] ?>, |
Transmis le : <?= $image['date_transmission'] ?>"> |
<img height="<?= $image['taille']['hauteur']; ?>" width="<?= $image['taille']['largeur']; ?>" src="<?= $image['url_image_m']; ?>" alt="Taxon : <?= aControleur::convertirChaineTaxonPourAffichage($image['nom_ret']) ?>, |
Localisation : <?= $image['location'].' ('.$image['id_location'].')'; ?>, |
Transmis le : <?= $image['date_transmission'] ?>"> |
<img height="<?= $image['taille']['hauteur']; ?>" width="<?= $image['taille']['largeur']; ?>" src="<?= $image['url_image_m']; ?>" /> |
Transmis le : <?= $image['date_transmission'] ?>" /> |
</a> |
<div class="pliage"> |
<h4 class="lien_pliage_invisible" title="voir les informations associées"> + </h4> |
<dl class="image_information"> |
<dt>Taxon</dt> |
<dd><a href="?module=Image&action=rechercherImage&image_recherche=<?= aControleur::convertirChaineTaxonPourRequeteUrl($image['nom_ret']); ?>" title="voir toutes les images de ce taxon" ><?= aControleur::formaterChaineTaxon($image['nom_ret']) ?></a></dd> |
<dd><a href="?module=Image&action=rechercherImage&image_recherche=<?= aControleur::convertirChaineTaxonPourRequeteUrl($image['nom_ret']); ?>" title="voir toutes les images de ce taxon" ><?= aControleur::convertirChaineTaxonPourAffichage($image['nom_ret']) ?></a></dd> |
<dt>Localisation</dt> |
<dd><a href="?module=Image&action=rechercherImage&image_recherche=<?= aControleur::convertirChainelocaliteDepartementPourRequeteUrl($image['location'],$image['id_location']); ?>" title="voir toutes les images de cette commune" ><?= aControleur::formaterChaineLocaliteDepartement($image['location'],$image['id_location']); ?> </a></dd> |
<dt> Auteur <dt> |
<dd><?= aControleur::couperCourriel($image['ci_ce_utilisateur']); ?><dd> |
<dd><a href="?module=Image&action=rechercherImage&image_recherche=<?= aControleur::convertirChainelocaliteDepartementPourRequeteUrl($image['location'],$image['id_location']); ?>" title="voir toutes les images de cette commune" ><?= aControleur::formaterChaineLocaliteDepartement($image['location'],$image['id_location']); ?> </a></dd> |
<dt> Auteur </dt> |
<dd><?= aControleur::couperCourriel($image['ci_ce_utilisateur']); ?></dd> |
<dt>Transmis le </dt> |
<dd><?= $image['date_transmission'] ?></dd> |
/trunk/controleurs/Image.php |
---|
56,7 → 56,7 |
$critere_pour_dao = $_GET['image_recherche']; |
if($this->estUneRechercheGenerale($critere_pour_dao)) { |
if(aControleur::estUneRechercheGenerale($critere_pour_dao)) { |
$critere_pour_dao = aControleur::convertirChaineRequeteGeneralePourDao($critere_pour_dao); |
} else { |
$critere_pour_dao = aControleur::convertirChaineRequetePourDao($critere_pour_dao); |
129,7 → 129,7 |
$intervalle_max = (($page_en_cours) * $this->limit); |
$donnees['url_base_pagination'] = '?module=Image&action=rechercherImage&image_recherche='.$criteres.'&limit='.$this->limit.'&start='; |
$donnees['url_base_pagination'] = '?module=Image&action=rechercherImage&image_recherche='.$criteres.'&limit='.$this->limit.'&start='; |
$nb_pages = ceil($this->total_resultats/$this->limit); |
150,12 → 150,6 |
} |
// +---------------------------------------------------------------------------------------------------------------+ |
// METHODES POUR LA RECHERCHE DE DONNEES |
private function estUneRechercheGenerale($chaine_recherche) { |
return ((strpos($chaine_recherche, ':') === false) && (strlen($chaine_recherche) > 0)); |
} |
// +---------------------------------------------------------------------------------------------------------------+ |
// METHODES POUR L'AFFICHAGE DE DONNEES |
private function getUrlImageBase($id, $format = 'L') { |
/trunk/controleurs/aControleur.php |
---|
237,6 → 237,7 |
public static function convertirChaineRequetePourDao($chaine) { |
$chaine = str_replace(':', '=', $chaine); |
$chaine = str_replace(':', '=', $chaine); |
$chaine = str_replace('+', '&', $chaine); |
$chaine = str_replace(' ','%20',$chaine); |
269,6 → 270,16 |
return $chaine; |
} |
public static function convertirChaineTaxonPourAffichage($taxon) { |
if($taxon == 'null') { |
$taxon = 'indetermine'; |
} |
$chaine = 'taxon:'.htmlentities($taxon); |
return $chaine; |
} |
public static function convertirChaineAuteurPourRequeteUrl($auteur) { |
$chaine = 'auteur:'.self::convertirPourUrl($auteur); |
312,9 → 323,20 |
return $str; |
} |
public static function estUneRechercheGenerale($chaine_recherche) { |
return ((strpos($chaine_recherche, ':') === false) && (strlen($chaine_recherche) > 0)); |
} |
public static function construireUrlFluxRssResultatsRecherche($criteres) { |
return Config::get('url_jrest').'CelSyndicationImage/MultiCriteres/rss2/M/?'.aControleur::convertirChaineRequetePourDao($criteres); |
if(self::estUneRechercheGenerale($criteres)) { |
$parametres = self::convertirChaineRequeteGeneralePourDao($criteres); |
} else { |
$parametres = self::convertirChaineRequetePourDao($criteres); |
} |
return Config::get('url_jrest').'CelSyndicationImage/MultiCriteres/rss2/M/?'.$parametres; |
} |
public static function construireIntituleResultatRecherche($criteres) { |
return 'résultats de cette recherche'; |