Improves display the job edition interface.
[platal.git] / templates / profile / general.tpl
index 4804bbf..2fb7661 100644 (file)
       <span class="titre">Promotion</span>
     </td>
     <td>
-      <span class="nom">X{$promo}{if ($promo != $promo_sortie - 3)} - X{math equation="a - b" a=$promo_sortie b=3}{/if}</span>
-      <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>
+      {if !$promo_choice}
+        <span class="nom">{$promo_display}</span>
+      {else}
+        <select name="promo_display">
+        {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>
+        {/foreach}
+        </select>
+      {/if}
+      <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>
     </td>
   </tr>
   <tr>
       <a href="javascript:delNationality('3');">{icon name=cross title="Supprimer cette nationalité"}</a>
     </td>
   </tr>
+</table>
+
+<table class="bicol" style="margin-bottom: 1em" summary="Profil&nbsp;: Formations">
   <tr>
-    <td colspan="2">
-      <span class="titre">Application</span>
-    </td>
-    <td></td>
-  </tr>
-  <tr>
-    <!--<td colspan="2">
-      {foreach from=$tels key=telid item=tel}
-        <div id="tels_{$telid}" style="clear: both; padding-top: 4px; padding-bottom: 4px">
-          {include file="profile/phone.tpl" prefname='tels' prefid='tels' telid=$telid tel=$tel}
-        </div>
-      {/foreach}
-      {if $tels|@count eq 0}
-        <div id="tels_0" style="clear: both; padding-top: 4px; padding-bottom: 4px">
-          {include file="profile/phone.tpl" prefname='tels' preid='tels' telid=0 tel=0}
-        </div>
-      {/if}
-      <div id="tels_add" class="center" style="clear: both; padding-top: 4px;">
-        <a href="javascript:addTel('tels', 'tels');">
-          {icon name=add title="Ajouter un téléphone"}Ajouter un téléphone
-        </a>
+    <th colspan="2">
+      <div class="flags" style="float: left">
+        <input type="checkbox" disabled="disabled" checked="checked" />
+        {icon name="flag_green" title="site public"}
       </div>
-    </td>-->
+      Formations
+    </th>
+  </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}
+  {/foreach}
+  {if $edus|@count eq 0}
+    {cycle values="impair, pair" assign=class}
+    {include file="profile/edu.tpl" eduid=0 edu=0 class=$class}
+  {/if}
+  {cycle values="impair, pair" assign=class}
+  {assign var=eduaddid value=$edus|@count}
+  <tr id="edu_add" class="edu_{$eduaddid} {$class}">
     <td colspan="2">
-      <!--{foreach from=$edus key=eduid item=edu}
-        <div id="edus_{$eduid}" style="clear: both; padding-top: 4px; padding-bottom: 4px">
-          {include file="profile/phone.tpl" prefname='edus' prefid='edus' eduid=$eduid edu=$edu}
-        </div>
-      {/foreach}
-      {if $edus|@count eq 0}
-        <div id="edus_0" style="clear: both; padding-top: 4px; padding-bottom: 4px">
-          {include file="profile/phone.tpl" prefname='edus' preid='edus' eduid=0 edu=0}
-        </div>
-      {/if}-->
-        <div id="edus_0" style="clear: both; padding-top: 4px; padding-bottom: 4px">
-          {include file="profile/edu.tpl" eduid=0 edus=$edu_0}
-        </div>
-        <div id="edus_1" style="clear: both; padding-top: 4px; padding-bottom: 4px">
-          {include file="profile/edu.tpl" eduid=1 edus=$edu_1}
-        </div>
-
-      <div id="edus_add" class="center" style="clear: both; padding-top: 4px;">
-        <a href="javascript:addEdu('edus', 'edus');">
-          {icon name=add title="Ajouter une formation"}Ajouter une formation
+      <div class="center" style="clear: both; padding-top: 4px;">
+        <a href="javascript:addEdu();">
+          {icon name=add title="Ajouter une formation"} Ajouter une formation
         </a>
       </div>
     </td>
   </tr>
-  <tr class="pair">
+  <tr class="{$class}">
     <td class="center" colspan="2">
       <small>Si ta formation ne figure pas dans la liste,
       <a href="mailto:support@{#globals.mail.domain#}">contacte-nous</a>.</small>
   <tr>
     <td {if !$nouvellephoto}colspan="2"{/if} class="center" style="width: 49%">
       <div class="titre">Ta photo actuelle</div>
-      <img src="photo/{$smarty.session.forlife}" alt=" [ PHOTO ] " style="max-height: 250px; margin-top: 1em" />
+      <img src="photo/{$smarty.session.hruid}" alt=" [ PHOTO ] " style="max-height: 250px; margin-top: 1em" />
     </td>
     {if $nouvellephoto}
     <td class="center" style="width: 49%">
       <div class="titre">Photo en attente de validation</div>
       <div>
-        <a href="profile/{$smarty.session.forlife}?modif=new" class="popup2">
+        <a href="profile/{$smarty.session.hruid}?modif=new" class="popup2">
           Ta fiche avec cette photo
         </a>
       </div>
-      <img src="photo/{$smarty.session.forlife}/req" alt=" [ PHOTO ] " style="max-height: 250px; margin-top: 1em" />
+      <img src="photo/{$smarty.session.hruid}/req" alt=" [ PHOTO ] " style="max-height: 250px; margin-top: 1em" />
     </td>
     {/if}
   </tr>
     </td>
   </tr>
   {if $email_error}
-    {include file="include/emails.combobox.tpl" name="email_directory" val=$email_directory_error error=$email_error}
-  {else}{include file="include/emails.combobox.tpl" name="email_directory" val=$email_directory error=$email_error}{/if}
+    {include file="include/emails.combobox.tpl" name="email_directory" val=$email_directory_error error=$email_error i="0"}
+  {else}{include file="include/emails.combobox.tpl" name="email_directory" val=$email_directory error=$email_error i="0"}{/if}
   <tr>
     <td colspan="2">
       <span class="titre">Messageries, networking et sites web</span>