Commit | Line | Data |
---|---|---|
b50bf10c SJ |
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 | ||
82f1afde | 23 | {if t($users) && $users|@count} |
b50bf10c SJ |
24 | <form action="{$platal->ns}directory/awact" method="post"> |
25 | {xsrf_token_field} | |
26 | <table cellspacing="2" cellpadding="0" class="tiny"> | |
27 | <tr> | |
28 | <th>Nom</th> | |
29 | <th>Email</th> | |
30 | <th>Demande d'activation</th> | |
31 | <th>Dernière relance</th> | |
32 | <th> | |
33 | <a href="javascript:toggleAll()">{icon name="arrow_refresh" title="Tout (dé)cocher"}</a> | |
34 | </th> | |
35 | </tr> | |
36 | {foreach from=$users item=user} | |
37 | {assign var=uid value=$user->id()} | |
38 | <tr> | |
39 | <td class="checkboxToggle">{profile user=$user promo=true}</td> | |
40 | <td class="checkboxToggle">{$user->email}</td> | |
41 | <td class="checkboxToggle">{$registration_date.$uid|date_format:"%x"}</td> | |
42 | <td class="checkboxToggle">{$last_date.$uid|date_format:"%x"}</td> | |
43 | <td class="checkboxToggle"><input type="checkbox" class="moderate_email" name="again[{$uid}]" /></td> | |
44 | </tr> | |
45 | {/foreach} | |
46 | <tr> | |
47 | <td colspan="5" class="center"> | |
48 | <input type="submit" value="Relancer" /> | |
49 | </td> | |
50 | </tr> | |
51 | </table> | |
52 | ||
53 | <script type="text/javascript">//<![CDATA[ | |
54 | {literal} | |
55 | var toggleState = false; | |
56 | function toggleAll() { | |
57 | toggleState = !toggleState; | |
58 | var boxes = $(':checkbox.moderate_email'); | |
59 | if (toggleState) { | |
60 | boxes.attr('checked', 'checked'); | |
61 | } else { | |
62 | boxes.removeAttr('checked'); | |
63 | } | |
64 | } | |
65 | ||
66 | $('.checkboxToggle').click(function (event) { | |
67 | // Don't uncheck the checkbox when clicking it | |
68 | if (event.target.tagName === 'INPUT') { | |
69 | return; | |
70 | } | |
71 | ||
72 | var checkbox = $(this).parent().find(':checkbox'); | |
73 | checkbox = checkbox.attr('checked', !checkbox.attr('checked')); | |
74 | event.stopPropagation(); | |
75 | }); | |
76 | {/literal} | |
77 | //]]></script> | |
78 | ||
79 | </form> | |
80 | {else} | |
81 | <p>Il n'y a aucun compte en attente d'activation pour ce groupe.</p> | |
82 | {/if} | |
83 | ||
84 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |