Editing the name of a profile update the name of the associated account
[platal.git] / templates / xnetgrp / annuaire.tpl
index 7ed7eb6..08ae87f 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2009 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2010 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
-<h1>{$asso.nom}&nbsp;: Annuaire du groupe </h1>
+<h1>{$asso->nom}&nbsp;: Annuaire du groupe </h1>
 
 <p class="descr">
-Le groupe {$asso.nom} compte {$nb_tot} membres&nbsp;:
+Le groupe {$asso->nom} compte {$nb_tot} membres&nbsp;:
 </p>
 
 <ul class="descr">
@@ -34,6 +34,7 @@ Le groupe {$asso.nom} compte {$nb_tot} membres&nbsp;:
       Ajouter un membre
     </a>
   </li>
+  {if $asso->has_ml}
   <li>
     <a href="{$platal->ns}admin/annuaire">
       {icon name=wand title="Synchroniser"} 
@@ -41,18 +42,19 @@ Le groupe {$asso.nom} compte {$nb_tot} membres&nbsp;:
     </a>
   </li>
   {/if}
+  {/if}
   <li>
-    <a href="{$platal->ns}annuaire/csv/{$asso.diminutif}.csv">
+    <a href="{$platal->ns}annuaire/csv/{$asso->diminutif}.csv">
       {icon name=page_excel title="Fichier Excel"} 
       Obtenir au format Excel
     </a>
   </li>
   <li>
-    <a href="{$platal->ns}annuaire/vcard/photos/{$asso.diminutif}.vcf">
+    <a href="{$platal->ns}annuaire/vcard/photos/{$asso->diminutif}.vcf">
       {icon name=vcard title="Carte de visite"} 
       Ajouter les membres à ton carnet d'adresse
     </a>
-    (<a href="{$platal->ns}annuaire/vcard/{$asso.diminutif}.vcf">sans les photos</a>)
+    (<a href="{$platal->ns}annuaire/vcard/{$asso->diminutif}.vcf">sans les photos</a>)
   </li>
 </ul>
 
@@ -104,21 +106,24 @@ Le groupe {$asso.nom} compte {$nb_tot} membres&nbsp;:
   <tr>
     <td>
       {profile user=$user promo=false}
+    </td>
     <td>
-      {if $user->group_perms eq 'admin'}<strong>{/if}
+      {if $user->group_perms eq 'admin' && $user->promo()}<strong>{/if}
       {$user->promo()}
-      {if $user->group_perms eq 'admin'}</strong>{/if}
+      {if $user->group_perms eq 'admin' && $user->promo()}</strong>{/if}
     </td>
     {if $user->group_comm}
     <td>{$user->group_comm}</td>
     {/if}
-    <td class="right" {if !$m->group_comm}colspan="2"{/if}>
-      <a href="https://www.polytechnique.org/vcard/{$m.email}.vcf">{icon name=vcard title="[vcard]"}</a>
-      <a href="mailto:{$m.email}@polytechnique.org">{icon name=email title="email"}</a>
+    <td class="right"{if !$user->group_comm} colspan="2"{/if}>
+      {if $user->hasProfile()}
+      <a href="https://www.polytechnique.org/vcard/{$user->login()}.vcf">{icon name=vcard title="[vcard]"}</a>
+      {/if}
+      <a href="mailto:{$user->bestEmail()}">{icon name=email title="email"}</a>
     </td>
     {if $is_admin}
     <td class="center">
-      <a href="{$platal->ns}member/{$user->login()}">{icon name=user_edit title="Edition du profil"}</a>
+      <a href="{$platal->ns}member/{$user->login()}">{icon name=user_edit title="Édition du profil"}</a>
       <a href="{$platal->ns}member/del/{$user->login()}">{icon name=delete title="Supprimer de l'annuaire"}</a>
     </td>
     {/if}
@@ -126,9 +131,9 @@ Le groupe {$asso.nom} compte {$nb_tot} membres&nbsp;:
   {/foreach}
 </table>
 
-{if $pages ge 1}
+{if $pages gt 1}
 <p class="descr" style="text-align: center">
-{section name="links" loop=$pages min=1}
+{section name="links" loop=$pages}
 {if $smarty.section.links.index eq $current}
 <span class="erreur">{$smarty.section.links.iteration}</span>
 {else}