d18bffd1a590ad3b7e90b980f05aa3f93d5c8aff
[platal.git] / templates / xnetgrp / annuaire.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2011 Polytechnique.org                             *}
4 {*  http://opensource.polytechnique.org/                                  *}
5 {*                                                                        *}
6 {*  This program is free software; you can redistribute it and/or modify  *}
7 {*  it under the terms of the GNU General Public License as published by  *}
8 {*  the Free Software Foundation; either version 2 of the License, or     *}
9 {*  (at your option) any later version.                                   *}
10 {*                                                                        *}
11 {*  This program is distributed in the hope that it will be useful,       *}
12 {*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
13 {*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
14 {*  GNU General Public License for more details.                          *}
15 {*                                                                        *}
16 {*  You should have received a copy of the GNU General Public License     *}
17 {*  along with this program; if not, write to the Free Software           *}
18 {*  Foundation, Inc.,                                                     *}
19 {*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
20 {*                                                                        *}
21 {**************************************************************************}
22
23 <h1>{$asso->nom}&nbsp;: Annuaire du groupe </h1>
24
25 <p class="descr">
26 Le groupe {$asso->nom} compte {$nb_tot} membres&nbsp;:
27 </p>
28
29 <ul class="descr">
30   {if $is_admin}
31   <li>
32     <a href="{$platal->ns}member/new">
33       {icon name=add title="Ajouter un membre"}
34       Ajouter un membre
35     </a>
36   </li>
37   <li>
38     <a href="{$platal->ns}directory/sync">
39       {icon name=arrow_refresh title="Synchroniser avec les listes"}
40       Synchroniser avec les listes
41     </a>
42   </li>
43   {if $asso->has_ml}
44   <li>
45     <a href="{$platal->ns}admin/annuaire">
46       {icon name=wand title="Synchroniser"}
47       Synchroniser annuaire et listes de diffusion
48     </a>
49   </li>
50   {/if}
51   {/if}
52   <li>
53     <a href="{$platal->ns}annuaire/csv/{$asso->diminutif}.csv">
54       {icon name=page_excel title="Fichier Excel"}
55       Obtenir au format Excel
56     </a>
57   </li>
58   <li>
59     <a href="{$platal->ns}annuaire/vcard/photos/{$asso->diminutif}.vcf">
60       {icon name=vcard title="Carte de visite"}
61       Ajouter les membres à ton carnet d'adresse
62     </a>
63     (<a href="{$platal->ns}annuaire/vcard/{$asso->diminutif}.vcf">sans les photos</a>)
64   </li>
65 </ul>
66
67 {if $plset_base}
68 {include core=plset.tpl}
69 {else}
70
71 <p class="center">
72 [<a href="{$platal->ns}annuaire?order={$order}" {if !$only_admin}class="erreur"{/if}>tous les membres</a>]
73 [<a href="{$platal->ns}annuaire?order={$order}&amp;admin=1" {if $only_admin}class="erreur"{/if}>animateurs</a>]<br/>
74 {*
75  XXX: This code has been temporary dropped, waiting for a cleaner way to do that stuff
76 {foreach from=$alphabet item=c}
77 {if $c}
78 [<a href="{$platal->ns}annuaire?order={$order}&amp;admin={$only_admin}"{if $request_group eq $c} class="erreur"{/if}>{$c}</a>]
79 {/if}
80 {/foreach}
81 *}
82 </p>
83
84 <table summary="membres du groupe" class="bicol">
85   <tr>
86     <th>
87       <a href="{$platal->ns}annuaire?order={if $order eq 'directory_name'}-{/if}directory_name&amp;admin={$only_admin}">
88       {if $order eq 'directory_name'}
89         <img src="{$platal->baseurl}images/dn.png" alt="" title="Tri croissant" />
90       {elseif $order eq '-directory_name'}
91         <img src="{$platal->baseurl}images/up.png" alt="" title="Tri décroissant" />
92       {/if}
93       NOM Prénom
94       </a>
95     </th>
96     <th>
97       <a href="{$platal->ns}annuaire?order={if $order eq 'promo'}-{/if}promo&amp;admin={$only_admin}">
98       {if $order eq '-promo'}
99         <img src="{$platal->baseurl}images/dn.png" alt="" title="Tri croissant" />
100       {elseif $order eq 'promo'}
101         <img src="{$platal->baseurl}images/up.png" alt="" title="Tri décroissant" />
102       {/if}
103       Promo
104       </a>
105     </th>
106     <th colspan="2">Infos</th>
107     {if $is_admin}
108     <th>Actions</th>
109     {/if}
110   </tr>
111   {assign var=lostUsers value=false}
112   {foreach from=$users item=user}
113   <tr>
114     <td>
115       {if $user->lost}{assign var=lostUsers value=true}{/if}
116       {profile user=$user promo=false}
117     </td>
118     <td>
119       {if $user->group_perms eq 'admin' && $user->category()}<strong>{/if}
120       {$user->category()|default:"Extérieur"}
121       {if $user->group_perms eq 'admin' && $user->category()}</strong>{/if}
122     </td>
123     {if $user->group_comm}
124     <td>{$user->group_comm}</td>
125     {/if}
126     <td class="right"{if !$user->group_comm} colspan="2"{/if}>
127       {if $user->hasProfile()}
128       <a href="https://www.polytechnique.org/vcard/{$user->login()}.vcf">{icon name=vcard title="[vcard]"}</a>
129       {/if}
130       <a href="mailto:{$user->bestEmail()}">{icon name=email title="email"}</a>
131     </td>
132     {if $is_admin}
133     <td class="center">
134       <a href="{$platal->ns}member/{$user->login()}">{icon name=user_edit title="Édition du profil"}</a>
135       <a href="{$platal->ns}member/del/{$user->login()}">{icon name=delete title="Supprimer de l'annuaire"}</a>
136     </td>
137     {/if}
138   </tr>
139   {/foreach}
140 </table>
141
142 {if $pages gt 1}
143 <p class="descr" style="text-align: center">
144 {section name="links" loop=$pages}
145 {if $smarty.section.links.index eq $current}
146 <span class="erreur">{$smarty.section.links.iteration}</span>
147 {else}
148 {if $smarty.section.links.first}
149 <a href="{$platal->ns}annuaire?offset={$current-1}&amp;order={$order}&amp;admin={$only_admin}">précédente</a>
150 {/if}
151 <a href="{$platal->ns}annuaire?offset={$smarty.section.links.index}&amp;order={$order}&amp;admin={$only_admin}">{$smarty.section.links.iteration}</a>
152 {if $smarty.section.links.last}
153 <a href="{$platal->ns}annuaire?offset={$current+1}&amp;order={$order}&amp;admin={$only_admin}">suivante</a>
154 {/if}
155 {/if}
156 {/section}
157 </p>
158 {/if}
159
160 {if $lostUsers}
161 <p class="smaller">
162   {icon name=error}&nbsp;Un camarade signalé par ce symbole n'a plus d'adresse de redirection et ne peut donc
163   plus être contacté via son adresse polytechnique.org. Si tu connais sa nouvelle adresse, tu peux nous la communiquer en
164   cliquant sur le symbole.
165 </p>
166 {/if}
167
168 {/if}
169
170 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}