0c79d7602bbaa2bcca89533228c371be4630d691
[platal.git] / templates / search / adv.form.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2011 Polytechnique.org                             *}
4 {*  http://opensource.polytechnique.org/                                  *}
5 {*                                                                        *}
6 {*  This program is free software; you can redistribute it and/or modify  *}
7 {*  it under the terms of the GNU General Public License as published by  *}
8 {*  the Free Software Foundation; either version 2 of the License, or     *}
9 {*  (at your option) any later version.                                   *}
10 {*                                                                        *}
11 {*  This program is distributed in the hope that it will be useful,       *}
12 {*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
13 {*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
14 {*  GNU General Public License for more details.                          *}
15 {*                                                                        *}
16 {*  You should have received a copy of the GNU General Public License     *}
17 {*  along with this program; if not, write to the Free Software           *}
18 {*  Foundation, Inc.,                                                     *}
19 {*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
20 {*                                                                        *}
21 {**************************************************************************}
22
23 <h1>Recherche dans l'annuaire</h1>
24
25 {if hasPerm('edit_directory,admin') && t($suggestAddresses)}
26 <p class="center"><strong>Voulez-vous télécharger le <a href="{$globals->baseurl}/search/adv/addresses{$plset_args}">tableau des adresses postales</a> pour la recette précédente&nbsp;?</strong></p>
27 {/if}
28
29 <script type="text/javascript">//<![CDATA[
30   {literal}$(function() { load_advanced_search({{/literal}{foreach from=$smarty.request key=key item=item}"{$key}":"{$item}",{/foreach}{literal}}); });{/literal}
31 //]]></script>
32
33 <p class="center">[<a href="search">Revenir à la recherche simple</a>]</p>
34 <form id="recherche" action="search/adv" method="get" onsubmit="return cleanForm(this)">
35   <table class="bicol" cellpadding="3" summary="Recherche">
36     <tr>
37       <th colspan="2">
38         Recherche avancée
39       </th>
40     </tr>
41     <tr>
42       <td>Nom, prénom, surnom...</td>
43       <td>
44         <input type="hidden" name="rechercher" value="Chercher"/>
45         <input type="submit" style="display:none"/>
46         <input type="text" name="name" size="32" value="{$smarty.request.name}" />
47         <select name="name_type">
48           <option value="" {if $smarty.request.name_type eq ''}selected="selected"{/if}>&nbsp;-&nbsp;</option>
49           <option value="lastname" {if $smarty.request.name_type eq 'lastname'}selected="selected"{/if}>nom</option>
50           <option value="firstname" {if $smarty.request.name_type eq 'firstname'}selected="selected"{/if}>prénom</option>
51           <option value="nickname" {if $smarty.request.name_type eq 'nickname'}selected="selected"{/if}>surnom</option>
52         </select>
53       </td>
54     </tr>
55     <tr>
56       <td>Promotion</td>
57       <td>
58         {include file="include/select_promo.tpl" promo_data=$smarty.request egal1="egal1" egal2="egal2" promo1="promo1" promo2="promo2" edu_type="edu_type"}
59       </td>
60     </tr>
61     <tr>
62       <td>Sexe</td>
63       <td>
64         <table>
65           <tr>
66             <td style="width:100px">
67               <input type="radio" name="woman" value="0" {if !$smarty.request.woman}checked="checked"{/if} id="woman0"/><label for="woman0">indifférent</label>
68             </td>
69             <td style="width:100px">
70               <input type="radio" name="woman" value="1" {if $smarty.request.woman eq 1}checked="checked"{/if} id="woman1"/><label for="woman1">homme</label>
71             </td>
72             <td style="width:100px">
73               <input type="radio" name="woman" value="2" {if $smarty.request.woman eq 2}checked="checked"{/if} id="woman2"/><label for="woman2">femme</label>
74             </td>
75           </tr>
76         </table>
77       </td>
78     </tr>
79     <tr>
80       <td>Sur Polytechnique.org</td>
81       <td>
82         <table>
83           <tr>
84             <td style="width:100px">
85               <input type="radio" name="subscriber" value="0" {if !$smarty.request.subscriber}checked="checked"{/if} id="subscriber0"/><label for="subscriber0">indifférent</label>
86             </td>
87             <td style="width:100px">
88               <input type="radio" name="subscriber" value="1" {if $smarty.request.subscriber eq 1}checked="checked"{/if} id="subscriber1"/><label for="subscriber1">inscrit</label>
89             </td>
90             <td style="width:100px">
91               <input type="radio" name="subscriber" value="2" {if $smarty.request.subscriber eq 2}checked="checked"{/if} id="subscriber2"/><label for="subscriber2">non inscrit</label>
92             </td>
93           </tr>
94         </table>
95       </td>
96     </tr>
97     <tr>
98       <td>A une redirection active</td>
99       <td>
100         <table>
101           <tr>
102             <td style="width:100px">
103               <input type="radio" name="has_email_redirect" value="0" {if !$smarty.request.has_email_redirect}checked="checked"{/if}
104                 id="has_email_redirect0" /><label for="has_email_redirect0">indifférent</label>
105             </td>
106             <td style="width:100px">
107               <input type="radio" name="has_email_redirect" value="1" {if $smarty.request.has_email_redirect eq 1}checked="checked"{/if}
108                 id="has_email_redirect1" /><label for="has_email_redirect1">oui</label>
109             </td>
110             <td style="width:100px">
111               <input type="radio" name="has_email_redirect" value="2" {if $smarty.request.has_email_redirect eq 2}checked="checked"{/if}
112                 id="has_email_redirect2" /><label for="has_email_redirect2">non</label>
113             </td>
114           </tr>
115         </table>
116       </td>
117     </tr>
118     <tr>
119       <td>En vie</td>
120       <td>
121         <table>
122           <tr>
123             <td style="width:100px">
124               <input type="radio" name="alive" value="0" {if !$smarty.request.alive}checked="checked"{/if} id="alive0"/><label for="alive0">indifférent</label>
125             </td>
126             <td style="width:100px">
127               <input type="radio" name="alive" value="1" {if $smarty.request.alive eq 1}checked="checked"{/if} id="alive1"/><label for="alive1">vivant</label>
128             </td>
129             <td style="width:100px">
130               <input type="radio" name="alive" value="2" {if $smarty.request.alive eq 2}checked="checked"{/if} id="alive2"/><label for="alive2">décédé</label>
131             </td>
132           </tr>
133         </table>
134       </td>
135     </tr>
136     <tr>
137       <td colspan="2">
138         <input type="checkbox" name="with_soundex" value="1" {if $smarty.request.with_soundex}checked="checked"{/if} id="sdxn" />
139         <label for="sdxn">Étendre par proximité sonore (uniquement sur nom et prénom).</label>
140       </td>
141     </tr>
142     <tr>
143       <th colspan="2">Géographie</th>
144     </tr>
145     <tr>
146       <td colspan="2" class="center"><small>Seuls les lieux où résident des camarades sont proposés ci-dessous.</small></td>
147     </tr>
148     <tr>
149       {include file="search/adv.form.autocomplete_select.tpl" description="Pays" name="country"
150         value_text=$smarty.request.country_text value=$smarty.request.country title="Tous les pays"}
151     </tr>
152     <tr id="administrative_area_level_1_list">
153       <td>Région, province, état&hellip;</td>
154       <td>
155         <input name="administrative_area_level_1" type="hidden" size="32" value="{$smarty.request.administrative_area_level_1}" />
156       </td>
157     </tr>
158     <tr id="administrative_area_level_2_list">
159       <td>Département, comté&hellip;</td>
160       <td>
161         <input name="administrative_area_level_2" type="hidden" size="32" value="{$smarty.request.administrative_area_level_2}" />
162       </td>
163     </tr>
164     <tr id="administrative_area_level_3_list">
165       <td>Canton&hellip;</td>
166       <td>
167         <input name="administrative_area_level_3" type="hidden" size="32" value="{$smarty.request.administrative_area_level_3}" />
168       </td>
169     </tr>
170     <tr id="locality_text">
171       <td>Ville</td>
172       <td><input type="text" class="autocomplete" name="locality_text" size="32" value="{$smarty.request.locality_text}" /></td>
173     </tr>
174     <tr id="locality_list">
175       <td>Ville</td>
176       <td>
177         <input name="locality" type="hidden" size="32" value="{$smarty.request.locality}" />
178       </td>
179     </tr>
180     <tr id="sublocality_list">
181       <td>Arrondissement, quartier&hellip;</td>
182       <td>
183         <input name="sublocality" type="hidden" size="32" value="{$smarty.request.sublocality}" />
184       </td>
185     </tr>
186     <tr>
187       <td colspan="2">
188         <label for="only_current">
189           <input name="only_current" id="only_current" type="checkbox"{if $smarty.request.only_current} checked="checked"{/if}/>
190           Chercher uniquement les adresses actuelles.
191         </label>
192       </td>
193     </tr>
194     <tr>
195       <th colspan="2">Activité</th>
196     </tr>
197     <tr>
198       <td>Entreprise</td>
199       <td><input type="text" class="autocomplete" name="entreprise" size="32" value="{$smarty.request.entreprise}" /></td>
200     </tr>
201     <tr>
202       <td>Description</td>
203       <td><input type="text" class="autocomplete" name="jobdescription" size="32" value="{$smarty.request.jobdescription}" /></td>
204     </tr>
205     <tr>
206       {include file="search/adv.form.autocomplete_select.tpl" description="Mots-clefs" name="jobterm"
207         value_text=$smarty.request.jobterm_text value=$smarty.request.jobterm title="Tous les mots-clefs"}
208     </tr>
209     {if hasPerm('directory_private')}
210     <tr>
211       <td>CV contient</td>
212       <td><input type="text" name="cv" size="32" value="{$smarty.request.cv}" /></td>
213     </tr>
214     {/if}
215     <tr>
216       <td colspan="2">
217         <input type='checkbox' name='only_referent' {if $smarty.request.only_referent}checked='checked'{/if} id="only_referent"/>
218         <label for="only_referent">Chercher uniquement parmi les camarades se proposant comme référents.</label>
219       </td>
220     </tr>
221     <tr>
222       <th colspan="2">Divers</th>
223     </tr>
224     <tr>
225       {include file="search/adv.form.autocomplete_select.tpl" description="Nationalité" name="nationalite"
226         value_text=$smarty.request.nationalite_text value=$smarty.request.nationalite title="Toutes les nationalités"}
227     </tr>
228     {if hasPerm('directory_private')}
229     <tr>
230       {include file="search/adv.form.autocomplete_select.tpl" description="Binet" name="binet"
231         value_text=$smarty.request.binet_text value=$smarty.request.binet title="Tous les binets"}
232     </tr>
233     {/if}
234     <tr>
235       {include file="search/adv.form.autocomplete_select.tpl" description="Groupe X" name="groupex"
236         value_text=$smarty.request.groupex_text value=$smarty.request.groupex title="Tous les groupes X"}
237     </tr>
238     {if hasPerm('directory_private')}
239     <tr>
240       {include file="search/adv.form.autocomplete_select.tpl" description="Section" name="section"
241         value_text=$smarty.request.section_text value=$smarty.request.section title="Toutes les sections"}
242     </tr>
243     {/if}
244     <tr>
245       {include file="search/adv.form.autocomplete_select.tpl" description="Formation" name="school"
246         value_text=$smarty.request.school_text value=$smarty.request.school title="Toutes les formations"}
247     </tr>
248     <tr>
249       <td>Diplôme</td>
250       <td>
251         <input name="diploma" size="32" value="{$smarty.request.diploma}"/>
252       </td>
253     </tr>
254     <tr>
255       <td>Corps d'origine</td>
256       <td>
257         <select name="origin_corps">
258         {foreach from=$origin_corps_list key=id item=corps}
259           <option value="{$id}" {if $smarty.request.origin_corps eq $id}selected="selected"{/if}>{$corps}</option>
260         {/foreach}
261         </select>
262       </td>
263     </tr>
264     <tr>
265       <td>Corps actuel</td>
266       <td>
267         <select name="current_corps">
268         {foreach from=$current_corps_list key=id item=corps}
269           <option value="{$id}" {if $smarty.request.current_corps eq $id}selected="selected"{/if}>{$corps}</option>
270         {/foreach}
271         </select>
272       </td>
273     </tr>
274     <tr>
275       <td>Grade</td>
276       <td>
277         <select name="corps_rank">
278         {foreach from=$corps_rank_list key=id item=corps}
279           <option value="{$id}" {if $smarty.request.corps_rank eq $id}selected="selected"{/if}>{$corps}</option>
280         {/foreach}
281         </select>
282       </td>
283     </tr>
284     <tr>
285       <td>Commentaire contient</td>
286       <td><input type="text" name="free" size="32" value="{$smarty.request.free}" /></td>
287     </tr>
288     <tr>
289       <td>Numéro de téléphone</td>
290       <td><input type="text" name="phone_number" size="32" value="{$smarty.request.phone_number}"/></td>
291     </tr>
292     <tr>
293       <td style="vertical-align: middle">
294         <span>Networking et sites webs</span>
295       </td>
296       <td>
297         <table>
298           <tr>
299             <td style="padding-left: 0px;">
300               <input type="text" name="networking_address" size="32" value="{$smarty.request.networking_address}" />
301             </td>
302             <td>
303               <select name="networking_type">
304               {foreach from=$networking_types key=id item=network}
305                 <option value="{$id}" {if $smarty.request.networking_type eq $id}selected="selected"{/if}>{$network}</option>
306               {/foreach}
307               </select>
308             </td>
309           </tr>
310         </table>
311       </td>
312     </tr>
313         {if hasPerm('admin,edit_directory')}
314     <tr>
315       <td>Matricule AX</td>
316       <td>
317         <textarea name="schoolid_ax" rows="10" cols="12">{$smarty.request.schoolid_ax}</textarea>
318         <br />
319         <i>Entrer une liste de matricules AX (un par ligne)</i>
320       </td>
321         {/if}
322         {if $smarty.session.auth ge AUTH_COOKIE}
323     </tr>
324     <tr>
325       <td colspan="2">
326           <input type='checkbox' name='order' value='date_mod' {if $smarty.request.order eq "date_mod"}checked='checked'{/if} id="order"/>
327           <label for="order">Mettre les fiches modifiées récemment en premier.</label>
328       </td>
329     </tr>
330     <tr>
331       <td colspan="2">
332            <input type='checkbox' name='exact' id="exact" {if $smarty.request.exact}checked='checked'{/if} value='1'/>
333            <label for="exact">Faire une recherche exacte.</label>
334       </td>
335     </tr>
336         {/if}
337     <tr><td colspan="2"></td></tr>
338     <tr>
339       <td colspan="2" style="text-align: center">
340           <input type="submit" value="Chercher" />
341       </td>
342     </tr>
343   </table>
344 </form>
345
346 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}