3e8397cfe354fb6e85d906b63a2a25ada7b3ee0a
[platal.git] / templates / lists / liste.inc.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2013 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 <td style="width: 16px">
24   {if $liste.own && $liste.sub}
25   {icon name=wrench title="Modérateur"}
26   {elseif $liste.own}
27   {icon name=error title="Modérateur mais non-membre"}
28   {elseif $liste.priv}
29   {icon name=weather_cloudy title="Liste privée"}
30   {/if}
31 </td>
32 <td>
33   <a href='{$platal->ns}lists/members/{$liste.list}'>{$liste.list}</a>
34 </td>
35 <td>
36   {$liste.desc|smarty:nodefaults}<br/>
37   {if $liste.subscriptions|@count}
38   <strong>&bull; Demandes d'inscription</strong><br />
39   {foreach from=$liste.subscriptions item=s}
40     <a href='{$platal->ns}lists/moderate/{$liste.list}?sadd={$s.id}&amp;token={xsrf_token}'
41         onclick="return updateHtml('list_{$liste.list}', '{$platal->ns}lists/ajax/{$liste.list}?sadd={$s.id}&amp;token={xsrf_token}');">
42       {icon name=add title="Accepter"}
43     </a>
44     <a href='{$platal->ns}lists/moderate/{$liste.list}?sid={$s.id}'>
45       {icon name=delete title="Refuser"}
46     </a>
47     {$s.name}
48     {if $s.login}
49     <a href="profile/{$s.login}" class="popup2">{icon name=user_suit title="Afficher la fiche"}</a>
50     {/if}
51     <br />
52   {/foreach}
53   {/if}
54   {if $liste.mails|@count}
55   <strong>&bull; Demandes de modération</strong><br />
56   <span class="smaller">
57   {foreach from=$liste.mails item=m}
58     <a href='{$platal->ns}lists/moderate/{$liste.list}?mid={$m.id}&amp;mok=1&amp;token={xsrf_token}'
59         onclick="return updateHtml('list_{$liste.list}', '{$platal->ns}lists/ajax/{$liste.list}?mid={$m.id}&amp;mok=1&amp;token={xsrf_token}');">
60       {icon name=add title="Valider l'email"}
61     </a>
62     <a href='{$platal->ns}lists/moderate/{$liste.list}?mid={$m.id}&amp;mdel=1&amp;token={xsrf_token}'
63         onclick="return updateHtml('list_{$liste.list}', '{$platal->ns}lists/ajax/{$liste.list}?mid={$m.id}&amp;mdel=1&amp;token={xsrf_token}');">
64       {icon name=delete title="Spam"}
65     </a>
66     De&nbsp;: {$m.sender}<br />
67     <a href='{$platal->ns}lists/moderate/{$liste.list}?mid={$m.id}'>
68       {icon name=magnifier title="Voir le message"}
69     </a>
70     Sujet&nbsp;: {$m.subj|hdc|smarty:nodefaults|default:"[pas de sujet]"}<br />
71   {/foreach}
72   </span>
73   {/if}
74 </td>
75 <td class='center'>
76   {if $liste.diff eq 2}modérée{elseif $liste.diff}restreinte{else}libre{/if}
77 </td>
78 <td class='center'>
79   {if $liste.ins}modérée{else}libre{/if}
80 </td>
81 <td class='right'>{$liste.nbsub}</td>
82 <td class='right'>
83   {if $liste.sub eq 2}
84   <a href='{$platal->ns}lists?del={$liste.list}&amp;token={xsrf_token}'
85       onclick="return updateHtml('list_{$liste.list}', '{$platal->ns}lists/ajax/{$liste.list}?unsubscribe=1&amp;token={xsrf_token}');">
86     {icon name=cross title="me désinscrire"}
87   </a>
88   {elseif $liste.sub eq 1}
89   {icon name=flag_orange title='inscription en attente de modération'}
90   {else}
91   <a href='{$platal->ns}lists?add={$liste.list}&amp;token={xsrf_token}'
92       onclick="return updateHtml('list_{$liste.list}', '{$platal->ns}lists/ajax/{$liste.list}?subscribe=1&amp;token={xsrf_token}');">
93     {icon name=add title="m'inscrire"}
94   </a>
95   {/if}
96  </td>
97
98 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}