Changes thoroughly education's implementation : allows multiple education, adds data...
[platal.git] / templates / profile / profile.tpl
index 24b7972..4d91800 100644 (file)
@@ -43,10 +43,26 @@ function chgMainWinLoc(strPage)
   <div id="photo" class="part">
     {if $photo_url}<img alt="Photo de {$x.forlife}" src="{$photo_url}" width="{$x.x}"/>{/if}
     {if $logged && ( $x.section|smarty:nodefaults || $x.binets_join|smarty:nodefaults || $x.gpxs_join|smarty:nodefaults)}
-      <h2>A l'X...</h2>
+      <h2>À l'X...</h2>
       {if $x.section}<div><em class="intitule">Section&nbsp;: </em><span>{$x.section}</span></div>{/if}
-      {if $x.binets_join}<div><em class="intitule">Binet(s)&nbsp;: </em><span>{$x.binets_join}</span></div>{/if}
-      {if $x.gpxs_join}<div><em class="intitule">Groupe(s) et institution(s) X&nbsp;: </em><span><br/>{$x.gpxs_join|smarty:nodefaults}</span></div>{/if}
+      {if $x.binets_join}<div><em class="intitule">Binet{if count($x.binets) > 1}s{/if}&nbsp;: </em>
+      <span>{$x.binets_join}</span></div>{/if}
+      {if $x.gpxs_join}<div><em class="intitule">Groupe{if count($x.gpxs) > 1}s{/if} et institution{if count($x.gpxs) > 1}s{/if} X&nbsp;: </em>
+      <span><br/>{$x.gpxs_join|smarty:nodefaults}</span></div>{/if}
+    {/if}
+    {if $x.networking}
+      <h2>Sur le web...</h2>
+      {foreach from=$x.networking item=network}
+        <img style="width: auto; padding: 0" src="profile/networking/{$network.type}" alt="{$network.name}" title="{$network.name}"/>
+        {if $network.filter == 'web'}
+          <a href="{$network.address}">{$network.address}</a>
+        {elseif $network.link != ''}
+          <a href="{$network.link}">{$network.address}</a>
+        {else}
+          {$network.address}
+        {/if}
+        <br/>
+      {/foreach}
     {/if}
     {if $x.freetext}
     <h2>Commentaires&nbsp;:</h2>
@@ -56,19 +72,18 @@ function chgMainWinLoc(strPage)
   <div id="fiche_identite" class="part">
     <div class="civilite">
       {if $x.sexe}&bull;{/if}
-      {$x.prenom} {if $x.nom_usage eq ""}{$x.nom}{else}{$x.nom_usage} ({$x.nom}){/if}
+      <span {if $x.name_tooltip neq ""}class="hinted" title="{$x.name_tooltip}"{/if}>{$x.name_display}</span>
       {if $logged}
       {if $x.nickname} (alias {$x.nickname}){/if}
       {/if}
-      {if $x.web}&nbsp;<a href="{$x.web}">{icon name="world_go" title="Site Web"}</a>{/if}
       {if $logged}
       &nbsp;{if !$x.dcd}<a href="vcard/{$x.forlife}.vcf">{*
         *}{icon name=vcard title="Afficher la carte de visite"}</a>{/if}
       {if !$x.is_contact}
-      <a href="javascript:chgMainWinLoc('carnet/contacts?action=ajouter&amp;user={$x.forlife}')">
+      <a href="javascript:chgMainWinLoc('carnet/contacts?action=ajouter&amp;user={$x.forlife}&amp;token={xsrf_token}')">
         {icon name=add title="Ajouter à mes contacts"}</a>
       {else}
-      <a href="javascript:chgMainWinLoc('carnet/contacts?action=retirer&amp;user={$x.forlife}')">
+      <a href="javascript:chgMainWinLoc('carnet/contacts?action=retirer&amp;user={$x.forlife}&amp;token={xsrf_token}')">
         {icon name=cross title="Retirer de mes contacts"}</a>
       {/if}
       {if hasPerm('admin')}
@@ -86,14 +101,14 @@ function chgMainWinLoc(strPage)
       le {$x.date|date_format}
     </div>
     {/if}
-    {if $logged || $x.mobile}
+    {if $logged || $x.tels}
     <div class="contact">
       {if $logged}
       <div class='email'>
         {if $x.dcd}
         Décédé{if $x.sexe}e{/if} le {$x.deces|date_format}
         {elseif !$x.actif}
-        Ce camarade n'a plus d'adresse de redirection valide,<br />
+        Ce{if $c.sexe}tte{/if} camarade n'a plus d'adresse de redirection valide,<br />
         <a href="marketing/broken/{$x.forlife}" class="popup">clique ici si tu connais son adresse email !</a>
         {elseif !$x.inscrit}
         Cette personne n'est pas inscrite à Polytechnique.org,<br />
@@ -109,24 +124,28 @@ function chgMainWinLoc(strPage)
         {/if}
       </div>
       {/if}
-      {if $x.mobile}
-      <div class="mob">
-        <em class="intitule">Mobile&nbsp;: </em>{$x.mobile}
-      </div>
+      {if $x.tels}
+        {display_phones tels=$x.tels}
       {/if}
       <div class='spacer'></div>
     </div>
     {/if}
     <div class='formation'>
-      {if $x.iso3166}
-      <img src='images/flags/{$x.iso3166}.gif' alt='{$x.nationalite}' height='11' title='{$x.nationalite}' />&nbsp;
+      {if $x.iso3166_1}
+      <img src='images/flags/{$x.iso3166_1}.gif' alt='{$x.nationalite}' height='11' title='{$x.nationalite}' />&nbsp;
+      {/if}
+      {if $x.iso3166_2}
+      <img src='images/flags/{$x.iso3166_2}.gif' alt='{$x.nationalite2}' height='11' title='{$x.nationalite2}' />&nbsp;
+      {/if}
+      {if $x.iso3166_3}
+      <img src='images/flags/{$x.iso3166_3}.gif' alt='{$x.nationalite3}' height='11' title='{$x.nationalite3}' />&nbsp;
       {/if}
       X {$x.promo}
       {if ($x.promo_sortie-3 > $x.promo)}
         - X {math equation="a-b" a=$x.promo_sortie b=3}
       {/if}
-      {if $x.applis_join}
-        &nbsp;-&nbsp;Formation&nbsp;: {$x.applis_join|smarty:nodefaults}
+      {if $x.education}
+        &nbsp;-&nbsp;Formation&nbsp;: {$x.education|smarty:nodefaults}
       {/if}
       {if $logged && $x.is_referent}
       [<a href="referent/{$x.forlife}" class='popup2'>Ma fiche référent</a>]
@@ -172,7 +191,7 @@ function chgMainWinLoc(strPage)
     <h2>Distinctions&nbsp;: </h2>
     {foreach from=$x.medals item=m}
     <div class="medal_frame">
-      <img src="profile/medal/{$m.id}" width="24" alt="{$m.medal}" title="{$m.medal}" style='float: left;' />
+      <img src="profile/medal/thumb/{$m.id}" height="50px" alt="{$m.medal}" title="{$m.medal}" style='float: left;' />
       <div class="medal_text">
         {$m.medal}<br />{$m.grade}
       </div>
@@ -187,13 +206,19 @@ function chgMainWinLoc(strPage)
     {$x.cv|miniwiki:title|smarty:nodefaults}
   </div>
   {/if}
-  {if !$logged}
+  {if $view eq 'public'}
   <div class="part">
     <small>
     Cette fiche est publique et visible par tout internaute,<br />
     vous pouvez aussi voir <a href="profile/private/{$x.forlife}?display=light">celle&nbsp;réservée&nbsp;aux&nbsp;X</a>.
     </small>
   </div>
+  {elseif $view eq 'ax'}
+  <div class="part">
+    <small>
+    Cette fiche est privée et ne recense que les informations transmises à l'AX.
+    </small>
+  </div>
   {/if}
   <div class="spacer"></div>
 </div>