Subversion Repositories eFlore/Applications.coel-consultation

Rev

Rev 183 | Rev 189 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
25 jpm 1
<!-- COL - DEBUT MOTEUR RECHERCHE -->
2
<script type="text/javascript">
3
	// Function pour cacher / afficher les options de recherche
4
	$(document).ready(function() {
182 mathias 5
		$("#col-rech-opt-toggle").html("Afficher les options de recherche");
25 jpm 6
		$("#col-rech-opt").hide();
7
		$("#col-rech-opt-toggle").toggle(
8
			function() {
182 mathias 9
				$("#col-rech-opt-toggle").html("Cacher les options de recherche");
128 jpm 10
				$("#col-rech-opt").slideDown("fast");
25 jpm 11
			},
12
			function() {
182 mathias 13
				$("#col-rech-opt-toggle").html("Afficher les options de recherche");
128 jpm 14
				$("#col-rech-opt").slideUp("fast");
25 jpm 15
			}
16
		);
185 mathias 17
		// Le rôle de la personne ne peut être défini que si une personne est mentionnée
18
		function statutChampRole() {
19
			var contenu = $('input#nom-personne').val();
20
			if (contenu == '') {
21
				$('select#role-personne').attr('disabled', 'disabled');
22
			} else {
23
				$('select#role-personne').removeAttr('disabled');
24
			}
25
		}
26
		$('input#nom-personne').change(function() {
27
			statutChampRole();
28
		});
29
		statutChampRole();
180 mathias 30
		// Rechargement des options sélectionnées dans les select
31
		$('#col-form select').each(function() {
32
			var optionSelectionnee = $(this).attr('data-option-selectionnee');
33
			$(this).find('option[value="' + optionSelectionnee + '"]').attr('selected', 'selected');
34
		});
90 jpm 35
	});
25 jpm 36
</script>
180 mathias 37
 
7 jpm 38
<h2>Rechercher une collection</h2>
180 mathias 39
 
23 jpm 40
<form id="col-form" name="col-form" action="<?=$url_form;?>" method="get">
180 mathias 41
 
42
	<input name="module" type="hidden" value="<?=$url_module;?>" />
43
	<input name="action" type="hidden" value="<?=$url_action;?>" />
44
	<?php if (isset($url_contexte)) : ?>
169 jpm 45
		<input name="contexte" type="hidden" value="<?=$url_contexte;?>" />
180 mathias 46
	<? endif; ?>
47
 
48
	<input name="masque[cible]" type="hidden" value="collections" />
49
 
50
	<div id="col-rech-masque">
51
		<div class="champ-masque">
183 mathias 52
			<label class="label-gauche">Lieu de stockage</label>
180 mathias 53
			<input name="masque[lieu-stockage]" type="text" value="<?= $masque['lieu-stockage'] ?>" />
54
		</div>
55
		<div class="champ-masque">
183 mathias 56
			<label class="label-droite">Groupe taxonomique</label>
180 mathias 57
			<select name="masque[veg]" data-option-selectionnee="<?= $masque['veg'] ?>">
58
				<option value=""></option>
59
				<option value="PH">Phanérogames</option>
60
				<option value="GY">Gymnospermes</option>
61
				<option value="AN">Angiospermes</option>
62
				<option value="CR">Cryptogames</option>
63
				<option value="AL">Algues</option>
64
				<option value="CH">Champignons</option>
65
				<option value="LI">Lichens</option>
66
				<option value="BR">Bryophytes</option>
67
				<option value="PT">Ptéridophytes</option>
68
			</select>
69
		</div>
70
		<div class="champ-masque">
183 mathias 71
			<label class="label-gauche">Lieu de récolte</label>
180 mathias 72
			<input name="masque[zg]" type="text" value="<?= $masque['zg'] ?>" />
73
		</div>
74
		<div class="champ-masque">
183 mathias 75
			<label class="label-droite">Type de collection</label>
180 mathias 76
			<select name="masque[bot]" data-option-selectionnee="<?= $masque['bot'] ?>">
77
				<option value=""></option>
78
				<option value="HE">Herbier</option>
79
				<option value="CE">Centurie</option>
80
				<option value="DR">Droguier</option>
81
				<option value="CA">Carpothèque</option>
82
				<option value="AL">Collection en alcool</option>
83
				<option value="XY">Xylothèque</option>
84
				<option value="PM">Préparations microscopiques</option>
85
			</select>
86
		</div>
87
		<div class="champ-masque">
183 mathias 88
			<label class="label-gauche">Personne</label>
185 mathias 89
			<input id="nom-personne" name="masque[p]" type="text" value="<?= $masque['p'] ?>" />
180 mathias 90
		</div>
91
		<div class="champ-masque">
185 mathias 92
			<label class="label-droite">&gt;&gt; ayant le rôle</label>
93
			<select id="role-personne" name="masque[pr]" data-option-selectionnee="<?= $masque['pr'] ?>">
180 mathias 94
				<option value=""></option>
95
				<option value="CT">Contributeur</option>
96
				<option value="AU">Auteur</option>
97
				<option value="CO">Collecteur</option>
98
				<option value="DE">Déterminateur</option>
99
				<option value="HE">Hébergeur</option>
100
			</select>
101
		</div>
102
	</div>
103
 
104
	<input id="col-rech-ok" type="submit" value="OK" />
105
 
20 jpm 106
</form>
128 jpm 107
 
180 mathias 108
<h2>Rechercher une personne</h2>
109
 
110
<form id="pers-form" name="col-form" action="<?=$url_form;?>" method="get">
111
 
112
	<input name="module" type="hidden" value="<?=$url_module;?>" />
113
	<input name="action" type="hidden" value="<?=$url_action;?>" />
114
	<?php if (isset($url_contexte)) : ?>
115
		<input name="contexte" type="hidden" value="<?=$url_contexte;?>" />
116
	<? endif; ?>
117
 
118
	<input name="masque[cible]" type="hidden" value="personnes" />
119
 
120
	<div id="col-rech-masque">
121
		<div class="champ-masque">
183 mathias 122
			<label class="label-gauche">Nom de famille</label>
180 mathias 123
			<input name="masque[nom-famille]" type="text" value="<?= $masque['nom-famille'] ?>" />
124
		</div>
125
		<div class="champ-masque">
183 mathias 126
			<label class="label-droite">Date de collecte</label>
127
			<input name="masque[date-vivant]" type="text" class="input-droite" value="<?= $masque['date-vivant'] ?>" />
180 mathias 128
		</div>
129
		<div class="champ-masque">
130
		</div>
185 mathias 131
		<div class="champ-masque">
132
			<label class="label-droite">Localité</label>
133
			<input name="masque[adresse]" type="text" class="input-droite" value="<?= $masque['adresse'] ?>" />
134
		</div>
180 mathias 135
	</div>
136
 
137
	<input id="col-rech-ok" type="submit" value="OK" />
138
 
139
</form>
140
 
141
<br/>
142
<a id="col-rech-opt-toggle" href="#col-rech-opt-txt" title="Précisions sur les options de recherche"></a>
143
 
23 jpm 144
<div id="col-rech-opt">
145
	<h2 id="col-rech-opt-titre">Options de recherche</h2>
146
	<div id="col-rech-opt-txt">
106 jpm 147
		<p>
148
			Par défaut, la recherche est insensible à la casse (majuscule / minuscule) et s'effectue
149
			en intercalant automatiquement le joker % avant et après la chaine recherchée et entre chaque mot
150
			de celle-ci.
151
		</p>
84 jpm 152
		<p>Pour les opérateurs dont la valeur est un <em>texte libre</em> ou une <em>liste</em>,
153
			il est possible d'utiliser des jokers.
182 mathias 154
			Ces "jokers" permettent de modifier la recherche.
23 jpm 155
		</p>
156
		<table>
157
			<thead>
158
				<tr>
159
					<th>Joker</th>
84 jpm 160
					<th>Applicable sur</th>
23 jpm 161
					<th>Explication</th>
182 mathias 162
					<!-- <th>Exemples</th> -->
23 jpm 163
				</tr>
164
			</thead>
165
			<tbody>
166
				<tr>
167
					<td>""</td>
84 jpm 168
					<td>Texte libre</td>
23 jpm 169
					<td>Permet de rechercher sur une expression exacte.</td>
182 mathias 170
					<!-- <td><a href="<?=Recherche::getUrlExemple('"Archives de l\'herbier Granger"')?>">
171
						"Archives de l'herbier Granger"</a></td> -->
23 jpm 172
				</tr>
173
				<tr>
174
					<td>%</td>
84 jpm 175
					<td>Texte libre</td>
23 jpm 176
					<td>Remplace n'importe quel nombre de caractères, y compris aucun.</td>
182 mathias 177
					<!-- <td><a href="<?=Recherche::getUrlExemple('"herbier %Abbé% Carondelet"')?>">
178
						"herbier %Abbé% Carondelet"</a></td> -->
23 jpm 179
				</tr>
180
				<tr>
181
					<td>_</td>
84 jpm 182
					<td>Texte libre</td>
23 jpm 183
					<td>Remplace exactement un caractère</td>
182 mathias 184
					<!-- <td><a href="<?=Recherche::getUrlExemple('p:"Jo_l"')?>">p:"Jo_l"</a></td> -->
23 jpm 185
				</tr>
84 jpm 186
				<tr>
187
					<td>,</td>
188
					<td>Liste</td>
189
					<td>Permet d'indiquer plusieurs valeurs</td>
182 mathias 190
					<!-- <td><a href="<?=Recherche::getUrlExemple('veg:br,ph')?>">veg:br,ph</a></td> -->
84 jpm 191
				</tr>
23 jpm 192
			</tbody>
193
		</table>
194
	</div>
25 jpm 195
</div>
196
<!-- COL - FIN MOTEUR RECHERCHE -->