Improves education's form display (Finaly closes #209)
[platal.git] / templates / profile / general.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2008 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 <table class="bicol" style="margin-bottom: 1em"
24   summary="Profil&nbsp;: Informations générales">
25   <tr>
26     <th colspan="2">
27       <div class="flags" style="float: left">
28         <input type="checkbox" disabled="disabled" checked="checked" />
29         {icon name="flag_green" title="site public"}
30       </div>
31       Informations générales
32     </th>
33   </tr>
34   <tr>
35     <td>
36       <span class="titre">Nom</span><br/>
37     </td>
38     <td>
39       {$nom}
40       <input type='hidden' name='nom' {if $errors.nom}class="error"{/if} value="{$nom}" />
41     </td>
42   </tr>
43   <tr>
44     <td>
45       <span class="titre">Prénom</span><br/>
46     </td>
47     <td>
48       {$prenom}
49       <input type='hidden' name='prenom' {if $errors.prenom}class="error"{/if} value="{$prenom}" />
50     </td>
51   </tr>
52   <tr>
53     <td>
54       <span class="titre">Affichage de ton nom</span>
55     </td>
56     <td>
57       {if $tooltip_name}<span title="{$tooltip_name}" class="hint">{$display_name}</span>{else}{$display_name}{/if}
58       <a href="profile/edit#names_advanced" onclick="$('#names_advanced').show();$(this).hide();document.location = document.location + '#names_advanced';return false">
59         {icon name="page_edit" title="Plus de détail"}
60       </a>
61     </td>
62   </tr>
63   <tr>
64     <td>
65       <span class="titre">Promotion</span>
66     </td>
67     <td>
68       <span class="nom">X{$promo}{if ($promo != $promo_sortie - 3)} - X{math equation="a - b" a=$promo_sortie b=3}{/if}</span>
69       <span class="lien"><a href="profile/orange" {if ($promo_sortie -3 == $promo)} {popup text="pour les oranges"}{/if}>{icon name="page_edit" title="modifier"}</a></span>
70     </td>
71   </tr>
72   <tr>
73     <td>
74       <span class="titre">Date de naissance</span>
75     </td>
76     <td><input type="text" {if $errors.naissance}class="error"{/if} name="naissance" value="{$naissance}" /></td>
77   </tr>
78   <tr>
79     <td>
80       <span class="titre">Nationalité</span>
81     </td>
82     <td>
83       <select name="nationalite">
84         {select_nat valeur=$nationalite pad=1}
85       </select>
86       <a href="javascript:addNationality();">{icon name=add title="Ajouter une nationalité"}</a>
87     </td>
88   </tr>
89   <tr id="nationalite2" {if !$nationalite2}style="display: none"{/if}>
90     <td></td>
91     <td>
92       <select name="nationalite2">
93         {select_nat valeur=$nationalite2 pad=1}
94       </select>
95       <a href="javascript:delNationality('2');">{icon name=cross title="Supprimer cette nationalité"}</a>
96     </td>
97   </tr>
98   <tr id="nationalite3" {if !$nationalite3}style="display: none"{/if}>
99     <td></td>
100     <td>
101       <select name="nationalite3">
102         {select_nat valeur=$nationalite3 pad=1}
103       </select>
104       <a href="javascript:delNationality('3');">{icon name=cross title="Supprimer cette nationalité"}</a>
105     </td>
106   </tr>
107 </table>
108
109 <table class="bicol" style="margin-bottom: 1em" summary="Profil&nbsp;: Formations">
110   <tr>
111     <th colspan="2">
112       <div class="flags" style="float: left">
113         <input type="checkbox" disabled="disabled" checked="checked" />
114         {icon name="flag_green" title="site public"}
115       </div>
116       Formations
117     </th>
118   </tr>
119   {foreach from=$edus key=eduid item=edu}
120     {cycle values="impair, pair" assign=class}
121     {include file="profile/edu.tpl" eduid=$eduid edu=$edu edu_fields=$edu_fields class=$class}
122   {/foreach}
123   {if $edus|@count eq 0}
124     {cycle values="impair, pair" assign=class}
125     {include file="profile/edu.tpl" eduid=0 edu=0 class=$class}
126   {/if}
127   {cycle values="impair, pair" assign=class}
128   <tr id="edu_add" class="{$class}">
129     <td colspan="2">
130       <div class="center" style="clear: both; padding-top: 4px;">
131         <a href="javascript:addEdu();">
132           {icon name=add title="Ajouter une formation"} Ajouter une formation
133         </a>
134       </div>
135     </td>
136   </tr>
137   <tr class="{$class}">
138     <td class="center" colspan="2">
139       <small>Si ta formation ne figure pas dans la liste,
140       <a href="mailto:support@{#globals.mail.domain#}">contacte-nous</a>.</small>
141     </td>
142   </tr>
143  </table>
144
145 <table class="bicol" style="margin-bottom: 1em;display:none"
146   summary="Profil : Noms" id="names_advanced">
147   <tr>
148     <th colspan="2">
149       Noms
150     </th>
151   </tr>
152   <tr class="impair">
153     <td>
154       <span class="flags">
155         <input type="checkbox" checked="checked" disabled="disabled" />
156         {icon name="flag_green" title="site public"}
157       </span>&nbsp;
158       <span class="titre">Affichage courant de ton nom</span>
159       <a class="popup3" href="Xorg/Profil#name_displayed">{icon name="information" title="aide"}</a>
160     </td>
161     <td>
162       <input type="text" name="display_name" value="{$display_name}" size="40"/>
163     </td>
164   </tr>
165   <tr class="impair">
166     <td>
167       <span class="titre">explication</span>
168       <a class="popup3" href="Xorg/Profil#name_tooltip">{icon name="information" title="aide"}</a>
169     </td>
170     <td>
171       <input type="text" name="tooltip_name" value="{$tooltip_name}" size="40"/>
172     </td>
173   </tr>
174   <tr class="impair">
175     <td>
176       <span class="titre">ranger ce nom à</span>
177       <a class="popup3" href="Xorg/Profil#name_order">{icon name="information" title="aide"}</a>
178     </td>
179     <td>
180       <input type="text" name="sort_name" value="{$sort_name}" size="40"/>
181     </td>
182   </tr>
183   <tr class="impair">
184     <td>
185       <span class="flags">
186         <input type="checkbox" checked="checked" disabled="disabled" />
187         {icon name="flag_red" title="privé"}
188       </span>&nbsp;
189       <span class="titre">Comment on doit t'appeller</span>
190       <a class="popup3" href="Xorg/Profil#name_yourself">{icon name="information" title="aide"}</a>
191     </td>
192     <td>
193       <input type="text" name="yourself" value="{$yourself}" size="40"/>
194     </td>
195   </tr>
196   <tr class="impair">
197     <td colspan="2">
198       <span class="titre">Recherche</span><span class="smaller">, ta fiche apparaît quand on cherche un de ces noms</span>
199       <a class="popup3" href="Xorg/Profil#name_search">{icon name="information" title="aide"}</a>
200       {iterate from=$search_names item="sn"}
201       <div id="search_name_{$sn.sn_id}" style="padding:2px" class="center">
202         {include file="profile/general.searchname.tpl" i=$sn.sn_id sn=$sn}
203       </div>
204       {/iterate}
205       <div id="add_search_name" class="center" style="clear: both">
206         <a href="javascript:addSearchName()">
207           {icon name=add title="Ajouter un nom de recherche"} Ajouter un nom
208         </a>
209       </div>
210     </td>
211 </table>
212
213 {if !$no_private_key}
214 <table class="bicol"  style="margin-bottom: 1em"
215   summary="Profil&nbsp;: Informations générales">
216   <tr>
217     <th>
218       Synchronisation avec l'AX
219     </th>
220   </tr>
221   <tr>
222     <td class="flags">
223       <input type="checkbox" name="synchro_ax" {if $synchro_ax}checked="checked" {/if}/>
224       {icon name="flag_orange" title="transmis à l'AX"}
225       <span class="texte">
226         Autoriser la synchronisation vers l'AX par des administrateurs ou des scripts automatiques.
227       </span>
228     </td>
229   </tr>
230   <tr>
231     <td>
232       <p>
233         Le service annuaire de l'<a href='http://www.polytechniciens.com'>AX</a> met à jour l'annuaire papier à partir des informations que tu lui fournis. Tu peux choisir ici d'envoyer directement les données de ta fiche Polytechnique.org vers ta <a href="http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&amp;anc_id={$matricule_ax}">fiche AX</a>.
234       </p>
235       <p>
236         L'opération de synchronisation prend en compte toutes les informations que tu as marquées comme transmises à l'AX (en orange ou en vert). Elle peut alors effacer, modifier ou rajouter des informations sur ta <a href="http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&amp;anc_id={$matricule_ax}">fiche AX</a> selon ce qui s'y trouve déjà.
237       </p>
238       <p class="center">
239         <a href="profile/edit/general?synchro_ax=confirm" onclick="return confirm('Es-tu sûr de vouloir lancer la synchronisation ?')"><input type="button" value="Synchroniser"/></a>
240       </p>
241     </td>
242   </tr>
243 </table>
244 {/if}
245
246 <table class="bicol"  style="margin-bottom: 1em"
247   summary="Profil&nbsp;: Trombinoscope">
248   <tr>
249     <th colspan="2">
250       <div class="flags" style="float: left">
251         <label><input type="checkbox" name="photo_pub" {if $photo_pub eq 'public'}checked="checked" {/if}/>
252         {icon name="flag_green" title="site public"}</label>
253       </div>
254       Trombinoscope
255     </th>
256   </tr>
257   <tr>
258     <td {if !$nouvellephoto}colspan="2"{/if} class="center" style="width: 49%">
259       <div class="titre">Ta photo actuelle</div>
260       <img src="photo/{$smarty.session.forlife}" alt=" [ PHOTO ] " style="max-height: 250px; margin-top: 1em" />
261     </td>
262     {if $nouvellephoto}
263     <td class="center" style="width: 49%">
264       <div class="titre">Photo en attente de validation</div>
265       <div>
266         <a href="profile/{$smarty.session.forlife}?modif=new" class="popup2">
267           Ta fiche avec cette photo
268         </a>
269       </div>
270       <img src="photo/{$smarty.session.forlife}/req" alt=" [ PHOTO ] " style="max-height: 250px; margin-top: 1em" />
271     </td>
272     {/if}
273   </tr>
274   <tr class="pair">
275     <td colspan="2">
276       Pour profiter de cette fonction intéressante, tu dois disposer
277       quelque part (sur ton ordinateur ou sur Internet) d'une photo
278       d'identité (dans un fichier au format JPEG, PNG ou GIF).<br />
279       <div class="center">
280         <a href="photo/change">Éditer ta photo</a>
281       </div>
282     </td>
283   </tr>
284 </table>
285
286 <table class="bicol" style="margin-bottom: 1em"
287   summary="Profil&nbsp;: Divers">
288   <tr>
289     <th colspan="2">
290       Divers
291     </th>
292   </tr>
293   <tr>
294     <td colspan="2">
295       <span class="titre">Téléphones personnels</span>
296     </td>
297   </tr>
298   <tr>
299     <td colspan="2">
300       {foreach from=$tels key=telid item=tel}
301         <div id="tels_{$telid}" style="clear: both; padding-top: 4px; padding-bottom: 4px">
302           {include file="profile/phone.tpl" prefname='tels' prefid='tels' telid=$telid tel=$tel}
303         </div>
304       {/foreach}
305       {if $tels|@count eq 0}
306         <div id="tels_0" style="clear: both; padding-top: 4px; padding-bottom: 4px">
307           {include file="profile/phone.tpl" prefname='tels' preid='tels' telid=0 tel=0}
308         </div>
309       {/if}
310       <div id="tels_add" class="center" style="clear: both; padding-top: 4px;">
311         <a href="javascript:addTel('tels', 'tels');">
312           {icon name=add title="Ajouter un téléphone"} Ajouter un téléphone
313         </a>
314       </div>
315     </td>
316   </tr>
317   {if $email_error}
318     {include file="include/emails.combobox.tpl" name="email_directory" val=$email_directory_error error=$email_error}
319   {else}{include file="include/emails.combobox.tpl" name="email_directory" val=$email_directory error=$email_error}{/if}
320   <tr>
321     <td colspan="2">
322       <span class="titre">Messageries, networking et sites web</span>
323     </td>
324   </tr>
325   {foreach from=$networking item=network key=id}
326     {include file="profile/general.networking.tpl" nw=$network i=$id}
327   {/foreach}
328   <tr id="networking">
329     <script type="text/javascript">//<![CDATA[
330       var nw_list = new Array();
331       {foreach from=$network_list item=network}
332         nw_list['{$network.name}'] = {$network.type};
333       {/foreach}
334     //]]></script>
335     <td colspan="2">
336       <div id="nw_add" class="center">
337         <a href="javascript:addNetworking();">
338           {icon name=add title="Ajouter une adresse"} Ajouter une adresse
339         </a>
340       </div>
341     </td>
342   </tr>
343 <!--  <tr id="networking">
344     <td colspan="2">
345       <div style="float: left; width: 200px;">
346         <span class="titre" style="margin-left:1em;">Type à ajouter</span>
347       </div>
348       <div style="float: left;">
349         <div id="nw_type_ac" style="background-color: white; border: solid 1px black; position: absolute; width: 208px; display: none">TEST</div>
350         <input type="text" size="30" id="nw_type" name="nw_type" onkeyup="updateNetworking()">
351         <span id="nw_add" style="display: none">
352           <a href="javascript:addNetworking();">{icon name=add title="Ajouter cette adresse"}</a>
353         </span>
354       </div>
355     </td>
356   </tr>-->
357   <tr class="pair">
358     <td>
359       <div>
360         <span class="flags">
361           <label><input type="checkbox" name="freetext_pub" {if $freetext_pub eq 'public'}checked="checked"{/if} />
362           {icon name="flag_green" title="site public"}</label>
363         </span>&nbsp;
364         <span class="titre">Commentaire</span>
365       </div>
366       <div class="smaller" style="margin-top: 30px">
367         <a href="wiki_help/notitle" class="popup3">
368           {icon name=information title="Syntaxe wiki"} Voir la syntaxe wiki autorisée
369         </a>
370         <div class="center">
371           <input type="submit" name="preview" value="Aperçu"
372                   onclick="previewWiki('freetext', 'ft_preview', true, 'ft_preview'); return false;" />
373         </div>
374       </div>
375     </td>
376     <td>
377       <div id="ft_preview" style="display: none"></div>
378       <textarea name="freetext" {if $errors.freetext}class="error"{/if}
379                 id="freetext" rows="8" cols="50" >{$freetext}</textarea>
380     </td>
381   </tr>
382 </table>
383
384 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}