Merge commit 'origin/master' into account
[platal.git] / templates / profile / general.tpl
index 1b16f1f..ebed93d 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2010 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
-{include file="profile/general.name.tpl display_name=$display_name tooltip_name=$tooltip_name prenom=$prenom
-  nom=$nom sort_name=$sort_name yourself=$yourself search_names=$search_names}
+<table class="bicol" style="margin-bottom: 1em" summary="Profil : Noms">
+  <tr>
+    <th colspan="3">Noms</th>
+  </tr>
+  <tr>
+    <td class="titre">
+      {icon name="flag_green" title="site public"}&nbsp;Affichage public
+    </td>
+    <td id="public_name">
+      {$public_name}
+    </td>
+    <td rowspan="2">
+      <a href="javascript:toggleNamesAdvanced();">
+        {icon name="page_edit" title="Plus de détail"}
+      </a>
+    </td>
+  </tr>
+  <tr>
+    <td class="titre">
+      {icon name="flag_red" title="site privé"}&nbsp;Affichage privé
+    </td>
+    <td id="private_name">
+      {$private_name}
+    </td>
+  </tr>
+  <tr>
+    <td>
+      <span class="titre">Comment t'appeller</span><br />
+      <span class="smaller">sur le site, dans la lettre mensuelle...</span>
+    </td>
+    <td>
+      <input type="text" name="yourself" value="{$yourself}" size="25"/>
+    </td>
+    <td></td>
+  </tr>
+  <tr class="names_advanced" {if !$errors.search_names}style="display: none"{/if}>
+    <td colspan="3">
+      <span class="titre">Gestion de tes noms, prénoms, surnoms...</span>
+      <span class="smaller">Ils déterminent la façon dont ton nom apparaît sur les annuaires
+      en ligne et papier et ta fiche apparaitra quand on cherche un de ces noms. Pour plus
+      d'explications sur l'icône suivante
+      <a href="profile/name_info" class="popup3">{icon name="information" title="Plus d'infos"}</a>.</span><br/>
+      <div class="small center">Si un de tes noms commence par une particule,
+      coche la case en bout de ligne.</div>
+    </td>
+  </tr>
+  {foreach from=$search_names item=sn key=id}
+    {include file="profile/general.searchname.tpl" i=$id sn=$sn
+    class="names_advanced" style="display: none" error_name=$errors.search_names}
+  {/foreach}
+  <tr class="names_advanced" id="searchname" {if !$errors.search_names}style="display: none"{/if}>
+    <td colspan="2">
+      <div id="sn_add" class="center">
+        <a href="javascript:addSearchName();">
+          {icon name=add title="Ajouter un nom"} Ajouter un nom
+        </a>
+      </div>
+    </td>
+  </tr>
+</table>
 
 <table class="bicol" style="margin-bottom: 1em"
   summary="Profil&nbsp;: Informations générales">
     </td>
     <td>
       {if !$promo_choice}
-        <span class="nom">{$promo_display}</span>
+        <span class="nom">{$promo}</span>
+        <input type="hidden" name="promo" value="{$promo}"/>
       {else}
-        <select name="promo_display">
+        <select name="promo">
         {foreach from=$promo_choice item="promo_to_display"}
-          <option value="{$promo_to_display}" {if $promo_to_display eq $promo_display}selected="selected"{/if}>{$promo_to_display}</option>
+          <option value="{$promo_to_display}" {if $promo_to_display eq $promo}selected="selected"{/if}>{$promo_to_display}</option>
         {/foreach}
         </select>
       {/if}
     <td>
       <span class="titre">Date de naissance</span>
     </td>
-    <td><input type="text" {if $errors.birthdate}class="error"{/if} name="naissance" value="{$birthdate}" /></td>
+    <td><input type="text" {if $errors.birthdate}class="error"{/if} name="birthdate" value="{$birthdate}" /></td>
   </tr>
   <tr>
     <td>
   </tr>
   {foreach from=$edus key=eduid item=edu}
     {cycle values="impair, pair" assign=class}
-    {include file="profile/edu.tpl" eduid=$eduid edu=$edu edu_fields=$edu_fields class=$class}
+    {include file="profile/general.edu.tpl" eduid=$eduid edu=$edu edu_fields=$edu_fields class=$class}
   {/foreach}
   {if $edus|@count eq 0}
     {cycle values="impair, pair" assign=class}
-    {include file="profile/edu.tpl" eduid=0 edu=0 class=$class}
+    {include file="profile/general.edu.tpl" eduid=0 edu=0 class=$class}
   {/if}
   {cycle values="impair, pair" assign=class}
   {assign var=eduaddid value=$edus|@count}
       </div>
     </td>
   </tr>
-<!--  <tr id="networking">
-    <td colspan="2">
-      <div style="float: left; width: 200px;">
-        <span class="titre" style="margin-left:1em;">Type à ajouter</span>
-      </div>
-      <div style="float: left;">
-        <div id="nw_type_ac" style="background-color: white; border: solid 1px black; position: absolute; width: 208px; display: none">TEST</div>
-        <input type="text" size="30" id="nw_type" name="nw_type" onkeyup="updateNetworking()">
-        <span id="nw_add" style="display: none">
-          <a href="javascript:addNetworking();">{icon name=add title="Ajouter cette adresse"}</a>
-        </span>
-      </div>
-    </td>
-  </tr>-->
   <tr class="pair">
     <td>
       <div>