Cleanup in alias management.
[platal.git] / templates / profile / general.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2009 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" summary="Profil : Noms">
24   <tr>
25     <th colspan="3">Noms</th>
26   </tr>
27   <tr>
28     <td class="titre">
29       {icon name="flag_green" title="site public"}&nbsp;Affichage public
30     </td>
31     <td id="public_name">
32       {$public_name}
33     </td>
34     <td rowspan="2">
35       <a href="javascript:displayNamesAdvanced();">
36         {icon name="page_edit" title="Plus de détail"}
37       </a>
38     </td>
39   </tr>
40   <tr>
41     <td class="titre">
42       {icon name="flag_red" title="site privé"}&nbsp;Affichage privé
43     </td>
44     <td id="private_name">
45       {$private_name}
46     </td>
47   </tr>
48   <tr>
49     <td>
50       <span class="titre">Comment t'appeller</span><br />
51       <span class="smaller">sur le site, dans la lettre mensuelle...</span>
52     </td>
53     <td>
54       <input type="text" name="yourself" value="{$yourself}" size="25"/>
55     </td>
56     <td></td>
57   </tr>
58   <tr class="names_advanced" style="display: none">
59     <td colspan="3">
60       <span class="titre">Gestion de tes noms, prénoms, surnoms...</span>
61       <span class="smaller">Ils déterminent la façon dont ton nom apparaît sur les annuaires
62       en ligne et papier et ta fiche apparaitra quand on cherche un de ces noms. Pour plus
63       d'explications sur l'icône suivante
64       <a href="profile/name_info" class="popup3">{icon name="information" title="Plus d'infos"}</a>.</span><br/>
65       <div class="small center">Si un de tes noms commence par une particule,
66       coche la case en bout de ligne.</div>
67     </td>
68   </tr>
69   {foreach from=$search_names item=sn key=id}
70     {include file="profile/general.searchname.tpl" i=$id sn=$sn class="names_advanced" style="display: none"}
71   {/foreach}
72   <tr class="names_advanced" id="searchname" style="display: none">
73     <td colspan="2">
74       <div id="sn_add" class="center">
75         <a href="javascript:addSearchName();">
76           {icon name=add title="Ajouter un nom"} Ajouter un nom
77         </a>
78       </div>
79     </td>
80   </tr>
81 </table>
82
83 <table class="bicol" style="margin-bottom: 1em"
84   summary="Profil&nbsp;: Informations générales">
85   <tr>
86     <th colspan="2">
87       <div class="flags" style="float: left">
88         <input type="checkbox" disabled="disabled" checked="checked" />
89         {icon name="flag_green" title="site public"}
90       </div>
91       Informations générales
92     </th>
93   </tr>
94   <tr>
95     <td>
96       <span class="titre">Promotion</span>
97     </td>
98     <td>
99       {if !$promo_choice}
100         <span class="nom">{$promo_display}</span>
101       {else}
102         <select name="promo_display">
103         {foreach from=$promo_choice item="promo_to_display"}
104           <option value="{$promo_to_display}" {if $promo_to_display eq $promo_display}selected="selected"{/if}>{$promo_to_display}</option>
105         {/foreach}
106         </select>
107       {/if}
108       <span class="lien"><a href="profile/orange" {if ($grad_year -3 == $entry_year)} {popup text="pour les oranges"}{/if}>{icon name="page_edit" title="modifier"}</a></span>
109     </td>
110   </tr>
111   <tr>
112     <td>
113       <span class="titre">Date de naissance</span>
114     </td>
115     <td><input type="text" {if $errors.birthdate}class="error"{/if} name="naissance" value="{$birthdate}" /></td>
116   </tr>
117   <tr>
118     <td>
119       <span class="titre">Nationalité</span>
120     </td>
121     <td>
122       <select name="nationality1">
123         {select_nat valeur=$nationality1 pad=1}
124       </select>
125       <a href="javascript:addNationality();">{icon name=add title="Ajouter une nationalité"}</a>
126     </td>
127   </tr>
128   <tr id="nationality2" {if !$nationality2}style="display: none"{/if}>
129     <td></td>
130     <td>
131       <select name="nationality2">
132         {select_nat valeur=$nationality2 pad=1}
133       </select>
134       <a href="javascript:delNationality('2');">{icon name=cross title="Supprimer cette nationalité"}</a>
135     </td>
136   </tr>
137   <tr id="nationality3" {if !$nationality3}style="display: none"{/if}>
138     <td></td>
139     <td>
140       <select name="nationality3">
141         {select_nat valeur=$nationality3 pad=1}
142       </select>
143       <a href="javascript:delNationality('3');">{icon name=cross title="Supprimer cette nationalité"}</a>
144     </td>
145   </tr>
146 </table>
147
148 <table class="bicol" style="margin-bottom: 1em" summary="Profil&nbsp;: Formations">
149   <tr>
150     <th colspan="2">
151       <div class="flags" style="float: left">
152         <input type="checkbox" disabled="disabled" checked="checked" />
153         {icon name="flag_green" title="site public"}
154       </div>
155       Formations
156     </th>
157   </tr>
158   {foreach from=$edus key=eduid item=edu}
159     {cycle values="impair, pair" assign=class}
160     {include file="profile/general.edu.tpl" eduid=$eduid edu=$edu edu_fields=$edu_fields class=$class}
161   {/foreach}
162   {if $edus|@count eq 0}
163     {cycle values="impair, pair" assign=class}
164     {include file="profile/general.edu.tpl" eduid=0 edu=0 class=$class}
165   {/if}
166   {cycle values="impair, pair" assign=class}
167   {assign var=eduaddid value=$edus|@count}
168   <tr id="edu_add" class="edu_{$eduaddid} {$class}">
169     <td colspan="2">
170       <div class="center" style="clear: both; padding-top: 4px;">
171         <a href="javascript:addEdu();">
172           {icon name=add title="Ajouter une formation"} Ajouter une formation
173         </a>
174       </div>
175     </td>
176   </tr>
177   <tr class="{$class}">
178     <td class="center" colspan="2">
179       <small>Si ta formation ne figure pas dans la liste,
180       <a href="mailto:support@{#globals.mail.domain#}">contacte-nous</a>.</small>
181     </td>
182   </tr>
183  </table>
184
185 <table class="bicol"  style="margin-bottom: 1em"
186   summary="Profil&nbsp;: Trombinoscope">
187   <tr>
188     <th colspan="2">
189       <div class="flags" style="float: left">
190         <label><input type="checkbox" name="photo_pub" {if $photo_pub eq 'public'}checked="checked" {/if}/>
191         {icon name="flag_green" title="site public"}</label>
192       </div>
193       Trombinoscope
194     </th>
195   </tr>
196   <tr>
197     <td {if !$nouvellephoto}colspan="2"{/if} class="center" style="width: 49%">
198       <div class="titre">Ta photo actuelle</div>
199       <img src="photo/{$profile->hrid()}" alt=" [ PHOTO ] " style="max-height: 250px; margin-top: 1em" />
200     </td>
201     {if $nouvellephoto}
202     <td class="center" style="width: 49%">
203       <div class="titre">Photo en attente de validation</div>
204       <div>
205         <a href="profile/{$profile->hrid()}?modif=new" class="popup2">
206           Ta fiche avec cette photo
207         </a>
208       </div>
209       <img src="photo/{$profile->hrid()}/req" alt=" [ PHOTO ] " style="max-height: 250px; margin-top: 1em" />
210     </td>
211     {/if}
212   </tr>
213   <tr class="pair">
214     <td colspan="2">
215       Pour profiter de cette fonction intéressante, tu dois disposer
216       quelque part (sur ton ordinateur ou sur Internet) d'une photo
217       d'identité (dans un fichier au format JPEG, PNG ou GIF).<br />
218       <div class="center">
219         <a href="photo/change">Éditer ta photo</a>
220       </div>
221     </td>
222   </tr>
223 </table>
224
225 <table class="bicol" style="margin-bottom: 1em"
226   summary="Profil&nbsp;: Divers">
227   <tr>
228     <th colspan="2">
229       Divers
230     </th>
231   </tr>
232   <tr>
233     <td colspan="2">
234       <span class="titre">Téléphones personnels</span>
235     </td>
236   </tr>
237   <tr>
238     <td colspan="2">
239       {foreach from=$tels key=telid item=tel}
240         <div id="tels_{$telid}" style="clear: both; padding-top: 4px; padding-bottom: 4px">
241           {include file="profile/phone.tpl" prefname='tels' prefid='tels' telid=$telid tel=$tel}
242         </div>
243       {/foreach}
244       {if $tels|@count eq 0}
245         <div id="tels_0" style="clear: both; padding-top: 4px; padding-bottom: 4px">
246           {include file="profile/phone.tpl" prefname='tels' preid='tels' telid=0 tel=0}
247         </div>
248       {/if}
249       <div id="tels_add" class="center" style="clear: both; padding-top: 4px;">
250         <a href="javascript:addTel('tels', 'tels');">
251           {icon name=add title="Ajouter un téléphone"} Ajouter un téléphone
252         </a>
253       </div>
254     </td>
255   </tr>
256   {if $email_error}
257     {include file="include/emails.combobox.tpl" name="email_directory" val=$email_directory_error error=$email_error i="0"}
258   {else}{include file="include/emails.combobox.tpl" name="email_directory" val=$email_directory error=$email_error i="0"}{/if}
259   <tr>
260     <td colspan="2">
261       <span class="titre">Messageries, networking et sites web</span>
262     </td>
263   </tr>
264   {foreach from=$networking item=network key=id}
265     {include file="profile/general.networking.tpl" nw=$network i=$id}
266   {/foreach}
267   <tr id="networking">
268     <script type="text/javascript">//<![CDATA[
269       var nw_list = new Array();
270       {foreach from=$network_list item=network}
271         nw_list['{$network.name}'] = {$network.type};
272       {/foreach}
273     //]]></script>
274     <td colspan="2">
275       <div id="nw_add" class="center">
276         <a href="javascript:addNetworking();">
277           {icon name=add title="Ajouter une adresse"} Ajouter une adresse
278         </a>
279       </div>
280     </td>
281   </tr>
282 <!--  <tr id="networking">
283     <td colspan="2">
284       <div style="float: left; width: 200px;">
285         <span class="titre" style="margin-left:1em;">Type à ajouter</span>
286       </div>
287       <div style="float: left;">
288         <div id="nw_type_ac" style="background-color: white; border: solid 1px black; position: absolute; width: 208px; display: none">TEST</div>
289         <input type="text" size="30" id="nw_type" name="nw_type" onkeyup="updateNetworking()">
290         <span id="nw_add" style="display: none">
291           <a href="javascript:addNetworking();">{icon name=add title="Ajouter cette adresse"}</a>
292         </span>
293       </div>
294     </td>
295   </tr>-->
296   <tr class="pair">
297     <td>
298       <div>
299         <span class="flags">
300           <label><input type="checkbox" name="freetext_pub" {if $freetext_pub eq 'public'}checked="checked"{/if} />
301           {icon name="flag_green" title="site public"}</label>
302         </span>&nbsp;
303         <span class="titre">Commentaire</span>
304       </div>
305       <div class="smaller" style="margin-top: 30px">
306         <a href="wiki_help/notitle" class="popup3">
307           {icon name=information title="Syntaxe wiki"} Voir la syntaxe wiki autorisée
308         </a>
309         <div class="center">
310           <input type="submit" name="preview" value="Aperçu"
311                   onclick="previewWiki('freetext', 'ft_preview', true, 'ft_preview'); return false;" />
312         </div>
313       </div>
314     </td>
315     <td>
316       <div id="ft_preview" style="display: none"></div>
317       <textarea name="freetext" {if $errors.freetext}class="error"{/if}
318                 id="freetext" rows="8" cols="50" >{$freetext}</textarea>
319     </td>
320   </tr>
321 </table>
322
323 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}