Add the list of the groups of the user and the lists of the mailing lists
[platal.git] / templates / lists / members.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
9f5bd98e 3{* Copyright (C) 2003-2010 Polytechnique.org *}
0337d704 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
3eb25eb3 24{include file="lists/header_listes.tpl" on=members}
0337d704 25
26<h1>
bc4ad6aa 27 Liste {$platal->argv[1]}
0337d704 28</h1>
29
30<table class='tinybicol' cellpadding='0' cellspacing='0'>
31 <tr>
38421eaa 32 <td class='titre'>Adresse&nbsp;:</td>
0337d704 33 <td>{mailto address=$details.addr}</td>
34 </tr>
35 <tr>
38421eaa 36 <td class='titre'>Sujet&nbsp;:</td>
92144f3e 37 <td>{$details.desc|smarty:nodefaults}</td>
0337d704 38 </tr>
39 <tr>
38421eaa 40 <td class='titre'>Visibilité&nbsp;:</td>
a7de4ef7 41 <td>{if $details.priv eq 0}publique{elseif $details.priv eq 1}privée{else}admin{/if}</td>
0337d704 42 </tr>
43 <tr>
38421eaa 44 <td class='titre'>Diffusion&nbsp;:</td>
a7de4ef7 45 <td>{if $details.diff eq 2}modérée{elseif $details.diff}restreinte{else}libre{/if}</td>
0337d704 46 </tr>
47 <tr>
38421eaa 48 <td class='titre'>Inscription&nbsp;:</td>
a7de4ef7 49 <td>{if $details.ins}modérée{else}libre{/if}</td>
0337d704 50 </tr>
51 <tr>
38421eaa 52 <td class='titre'>Nb. membres&nbsp;:</td>
0337d704 53 <td>{$nb_m|default:"0"}</td>
54 </tr>
55 <tr class="pair">
38421eaa 56 <td class="titre">Ton statut&nbsp;:</td>
0337d704 57 <td>
58 {if $details.sub>1}
59 Tu es inscrit sur la liste.<br />
e8439508 60 Te désinscrire&nbsp;:
2669eb7d 61 <a href='{$platal->pl_self(1)}?del=1&amp;token={xsrf_token}'>{icon name=cross title="me désinscrire"}</a>
0337d704 62 {elseif $details.sub eq 1}
63 Ta demande d'inscription est en cours de validation.
64 {else}
65 Tu n'es pas inscrit.<br />
e8439508 66 Demander ton inscription&nbsp;:
2669eb7d 67 <a href="{$platal->pl_self(1)}?add=1&amp;token={xsrf_token}">{icon name=add title="demander mon inscription"}</a>
0337d704 68 {/if}
69 </td>
70 </tr>
71</table>
72{if $details.info}
73<br />
74<table class='tinybicol' cellpadding='0' cellspacing='0'>
75 <tr><th colspan='2'>Informations sur la liste</th></tr>
76 <tr>
92144f3e 77 <td colspan='2'>{$details.info|smarty:nodefaults|nl2br}</td>
0337d704 78 </tr>
79</table>
80{/if}
81
82<h1>
a7de4ef7 83 modérateurs de la liste
0337d704 84</h1>
85
86{if $owners|@count}
87<table class='tinybicol' cellpadding='0' cellspacing='0'>
88 {foreach from=$owners item=xs key=promo}
d80b1087 89 {foreach from=$xs item=user name=all}
0337d704 90 <tr>
8138ece0 91 <td class='titre'>
92 {if $smarty.foreach.all.first}
93 {if $promo}{$promo}{else}non-X{/if}
94 {/if}
95 </td>
0337d704 96 <td>
d80b1087
SJ
97 {if $promo && $user.x}
98 {if $user.b}{assign var=lostUsers value=true}{/if}
99 {profile user=$user.x promo=false}
100 {elseif $user.x}
101 <a href="{$platal->ns}member/{$user.x}">{if $user.n|trim}{$x.n}{else}{$user.l}{/if}</a>
102 {elseif $user.n}
103 {$user.n}
0337d704 104 {else}
d80b1087 105 {$user.l}
0337d704 106 {/if}
0337d704 107 </td>
d80b1087 108 {if $user.p}
8138ece0 109 <td class="right">
d80b1087 110 {$user.p}
8138ece0 111 </td>
112 {/if}
0337d704 113 </tr>
114 {/foreach}
8138ece0 115 {/foreach}
0337d704 116</table>
117{/if}
118
119<h1>
120 membres de la liste
121 {if $smarty.get.alpha}
d1ebc57a 122 (<a href='{$platal->pl_self(1)}'>trier par promo</a>)
0337d704 123 {else}
d1ebc57a 124 (<a href='{$platal->pl_self(1)}?alpha=1'>trier par nom</a>)
0337d704 125 {/if}
126</h1>
127
b73bc04b 128
0337d704 129{if $members|@count}
130<table class='bicol' cellpadding='0' cellspacing='0'>
b73bc04b
FB
131 {if $details.own || hasPerms('admin,groupadmin')}
132 <tr><td colspan="3">
133 <a href="{$platal->ns}lists/csv/{$platal->argv[1]}/{$platal->argv[1]}.csv">
134 {icon name="page_excel" title="Télécharger la liste des membres"}
135 Télécharger la liste des membres au format Excel
136 </a>
137 </td></tr>
138 {/if}
4cc4d017 139 {assign var=lostUsers value=false}
f6c626bd 140 {foreach from=$members item=users key=promo}
a63fa177 141 {foreach from=$users item=user name=all}
0337d704 142 <tr>
8138ece0 143 <td class='titre' style="width: 20%">
144 {if $smarty.foreach.all.first}
145 {if $promo}{$promo}{else}non-X{/if}
146 {/if}
147 </td>
0337d704 148 <td>
f6c626bd 149 {if $promo && $user.x}
4cc4d017 150 {if $user.b}{assign var=lostUsers value=true}{/if}
f6c626bd
SJ
151 {profile user=$user.x promo=false}
152 {elseif $user.x}
153 <a href="{$platal->ns}member/{$user.x}">{if $user.n|trim}{$x.n}{else}{$user.l}{/if}</a>
154 {elseif $user.n}
155 {$user.n}
0337d704 156 {else}
f6c626bd 157 {$user.l}
0337d704 158 {/if}
0337d704 159 </td>
f6c626bd 160 {if $user.p}
8138ece0 161 <td class="right">
f6c626bd 162 {$user.p}
8138ece0 163 </td>
164 {/if}
0337d704 165 </tr>
166 {/foreach}
8138ece0 167 {/foreach}
0337d704 168</table>
aa7cb883 169
4cc4d017 170{if $lostUsers}
aa7cb883
SJ
171<p class="smaller">
172 {icon name=error}&nbsp;Un camarade signalé par ce symbole n'a plus d'adresse de redirection et ne peut donc
173 plus être contacté via son adresse polytechnique.org. Si tu connais sa nouvelle adresse, tu peux nous la communiquer en
174 cliquant sur le symbole.
175</p>
176{/if}
177
0337d704 178{/if}
179
180
a7de4ef7 181{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}