New shortcut in quick search to open user profile:
[platal.git] / templates / search / quick.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2007 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 {include file=search/quick.form.tpl show_js=1}
24
25 {if $smarty.session.perms->hasFlag('user')}
26 <h1>Voir le trombi d'une promotion</h1>
27
28 <div id="message" style="position:absolute;"></div><br />
29
30 <script type="text/javascript">
31   <!--
32   {literal}
33   function showPromo()
34   {
35       var value = document.getElementById('promo').value;
36       if (value < {/literal}{$promo_min}{literal} || value > {/literal}{$promo_max}{literal}) {
37         showTempMessage('message', "La promotion doit être entre {/literal}{$promo_min} et {$promo_max}{literal}.", false);
38         return false;
39       }
40       window.open("http://www.polytechnique.net/login/" + value + "/annuaire/trombi");
41       return false;
42   }
43   {/literal}
44   -->
45 </script>
46
47 <form action="" method="post" onsubmit="return showPromo();">
48 <table class="tinybicol" style="width: 35%; margin-right: auto; margin-left: auto">
49   <tr>
50     <td class="titre">Promotion :</td>
51     <td>
52       <input type="text" name="promo" id="promo" size="4" value="" />
53       <input type="submit" name="submit_promo" value="Voir" />
54     </td>
55   </tr>
56 </table>
57 </form>
58
59 {/if}
60
61 <h1>Comment faire une recherche ?</h1>
62
63 <h2>Nom, Prenom, Promotion ...</h2>
64
65 <p>
66 La ligne de recherche ci-dessus accepte non seulement des mélanges de <strong>noms</strong> et de <strong>prénoms</strong> ...
67 mais elle accepte de plus la syntaxe suivante pour les <strong>promotions</strong> :
68 </p>
69 <ul>
70   <li><code>1990</code> : signifie appartient à la promotion 1990</li>
71   <li><code>1990-2000</code> : signifie sur la promotion 1990 à 2000</li>
72   <li><code>&lt;1990</code> : signifie promotions inférieures ou égales à 1990</li>
73   <li><code>&gt;1990</code> : signifie promotions supérieures ou égales à 1990</li>
74 </ul>
75 <p>
76 Ainsi, rechercher tous les "Dupont" sur les promotions 1980 à 1990 et sur la promotion 2000 se fait avec la recherche :
77 <code>Dupont 1980-1990 2000</code>
78 </p>
79
80 <h2>Astuce pour les noms...</h2>
81 <p>
82 Parfois on ne sait plus si le nom qu'on recherche s'écrit « Lenormand », « Le Normand » ou « Le-Normand » ...
83 </p>
84 <p>
85 Pour éviter ce genre d'écueils, il suffit de chercher : <code>Le Normand</code><br />
86 En effet, le moteur de recherche va alors chercher tous les utilisateurs dont le nom 
87 contient 'Le' <strong>et</strong> 'Normand' sans distinction de casse et sans tenir compte des accents.
88 </p>
89 <p>
90 Il est conseillé d'omettre les particules car il est possible que celles-ci ne soient pas présentes dans
91 notre base de données.
92 </p>
93
94 <h2>Raccourcis...</h2>
95 <p>
96   En tapant <code>fiche:prenom.nom.promo</code> tu accèdes directement à la fiche du camarade correspondant.
97   De même <code>ref:prenom.nom.promo</code> t'emmène sur la fiche référent du camarade.
98 </p>
99 <p>
100   Ces raccourcis fonctionnement également depuis le lien de recherche rapide disponible sur toutes les pages
101   du site<span class="searchbar"> et depuis la barre de recherche de ton navigateur si tu installes le module
102   ci-dessous</span>.
103 </p>
104
105 {if $smarty.session.perms->hasFlag('user')}
106 <div class="searchbar">
107 <h2>Barre de recherche pour ton navigateur</h2>
108 <p>
109   Si tu utilises un navigateur moderne tel que Firefox ou Internet Explorer 7, tu peux ajouter un module de recherche
110   directement dans ton navigateur. Pour ceci, <a href="javascript:addSearchEngine()">installe</a> la barre de recherche
111   rapide.
112 </p>
113 </div>
114
115 {javascript name=jquery}
116 <script type="text/javascript">//<![CDATA[
117   {literal}
118   if (!canAddSearchEngine()) {
119     $(".searchbar").hide();
120   }
121   {/literal}
122 //]]></script>
123 {/if}
124
125 <h2>Polytechniciens des promotions 1919 et précédentes</h2>
126 <p>Notre base de données ne contient que les polytechniciens depuis la promotion 1920. Pour effectuer des recherches dans les
127 promotions précédentes, il faut utiliser l'<a href="http://biblio.polytechnique.fr/F/">annuaire en ligne de la bibliothèque de
128 l'École</a>.</p>
129
130 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}