Release of plat/al 1.1.12
[platal.git] / templates / profile / trombino.tpl
index de41dae..6da5a54 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2014 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 
 <h1>Trombinoscope</h1>
 
-<form enctype="multipart/form-data" action="photo/change" method="post">
+<form enctype="multipart/form-data" action="photo/change/{$hrpid}" method="post">
   {xsrf_token_field}
-  {if ($session.promo ge 1995) || ($session.promo le 2002)}
+  {assign var="profile" value=$smarty.session.user->profile()}
+  {if $profile && (($profile->yearpromo() ge 1995) || ($profile->yearpromo() le 2002))}
   <p>
   Si tu n'as pas encore fourni de photo, c'est celle du trombinoscope de l'X qui est
   affichée par défaut dans le profil. Si elle ne te plaît pas, ou si tu n'es quand même
     </tr>
     <tr>
       <td class="center">
-        <img src="photo/{$smarty.session.hruid}" width="200" alt=" [ PHOTO ] " />
+        <img src="photo/{$hrpid}" width="200" alt=" [ PHOTO ] " />
       </td>
       <td class="center half">
         {if $submited}
-        <img src="photo/{$smarty.session.hruid}/req" width="200" alt=" [ PHOTO ] " />
+        <img src="photo/{$hrpid}/req" width="200" alt=" [ PHOTO ] " />
         {else}
         Pas d'image soumise
         {/if}
     </tr>
     <tr>
       <th colspan="2">
-        Actions immédiates
+        Action non modérée
       </th>
     </tr>
     <tr>
       <td {if !$submited}colspan="2"{/if} class="center">
-        Si tu ne souhaites plus montrer cette photo tu peux aussi l'effacer en la remplaçant par&nbsp;: <br />
+        Si tu ne souhaites plus montrer cette photo tu peux aussi l'effacer en la remplaçant par&nbsp;:<br />
         {if $has_trombi_x}
         <input type="submit" value="Trombino de l'X" name="trombi" /><br />
         {/if}
@@ -77,7 +78,7 @@
       </td>
       {if $submited}
       <td class="center">
-        Tu peux annuler ta soumission et garder ta photo actuelle&nbsp;: <br />
+        Tu peux annuler ta soumission et garder ta photo actuelle&nbsp;:<br />
         <input type="submit" value="Annuler ta soumission" name="cancel" />
       </td>
       {/if}
@@ -96,7 +97,7 @@
         </p>
         <p>
         Si elle est sur Internet, choisis la seconde solution et nos robots iront la télécharger
-        directement où il faut&nbsp;:-)
+        directement où il faut.
         </p>
       </td>
     </tr>
 </form>
 
 
-{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
+{* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}