1 | [% vote = c.model('Vote') %] |
---|
2 | [% poll = c.model('Vote').poll(voteid) %] |
---|
3 | |
---|
4 | [% INCLUDE 'includes/admin_menu.tt' %] |
---|
5 | |
---|
6 | [% IF poll.status() != 'AFTER' %] |
---|
7 | <div style="float: left; width: 30%;" class="box"> |
---|
8 | <p>Ajouter un votant</p> |
---|
9 | <form action="[% c.uri_for(voteid, 'voting') %]" method="POST"> |
---|
10 | Nom: <input type="text" name="id"><br> |
---|
11 | Mail: <input type="text" name="mail"><br> |
---|
12 | <input type="submit" value="Ajouter"> |
---|
13 | </form> |
---|
14 | <hr> |
---|
15 | <p>Soumettre la liste via un fichier csv (le Nom est optionnel)</p> |
---|
16 | <p>Format: <i>Mail@domain;Nom</i></p> |
---|
17 | <form method="POST" ENCTYPE="multipart/form-data" action="[% c.uri_for(voteid, 'voting') %]"> |
---|
18 | <input type="file" name="votinglist"><br> |
---|
19 | [% IF poll.status == 'BEFORE' %] |
---|
20 | <input type="checkbox" name="delete">Effacer la liste des votants<br> |
---|
21 | [% END %] |
---|
22 | <input type="submit" value="Ajouter"> |
---|
23 | </form> |
---|
24 | <hr> |
---|
25 | <p>Envoyer les mots de passes au nouveaux votants</p> |
---|
26 | <form action="[% c.uri_for(voteid, 'voting') %]" method="POST"> |
---|
27 | <input type="submit" name="mailpasswd" value="Envoyer les mot de passe"> |
---|
28 | </form> |
---|
29 | </div> |
---|
30 | |
---|
31 | [% END %] |
---|
32 | |
---|
33 | <div class="box" style="float: right; width: 60%;"> |
---|
34 | |
---|
35 | [% IF NOT vote.vote_voting_count(voteid) %] |
---|
36 | <p class="alert">Aucun votant inscrit</p> |
---|
37 | [% ELSE %] |
---|
38 | |
---|
39 | [% signing = vote.vote_voting(voteid) %] |
---|
40 | |
---|
41 | [% FOREACH thisvoting = signing %] |
---|
42 | |
---|
43 | [% IF loop.first %] |
---|
44 | <table border="1"> |
---|
45 | [% END %] |
---|
46 | |
---|
47 | [% voting = vote.voting_info(thisvoting) %] |
---|
48 | <tr> |
---|
49 | |
---|
50 | [% IF NOT voting.date %] |
---|
51 | [% IF poll.status != 'AFTER' %] |
---|
52 | <form action="[% c.uri_for(voteid, 'voting') %]" method="POST"> |
---|
53 | <input type="hidden" name="delvoting" value="[% voting.vkey %]"> |
---|
54 | [% END %] |
---|
55 | [% END %] |
---|
56 | |
---|
57 | <td>[% voting.label | html %] [% voting.mail | html %]</td> |
---|
58 | <td>[% IF voting.passwd %]<i>(pass envoyé)</i>[% END %]</td> |
---|
59 | |
---|
60 | [% IF NOT voting.date %] |
---|
61 | <td> |
---|
62 | [% IF poll.status != 'AFTER' %] |
---|
63 | <input type="submit" name="delete" value="delete"> |
---|
64 | [% END %] |
---|
65 | </td> |
---|
66 | </form> |
---|
67 | [% ELSE %] |
---|
68 | <td>[% voting.date %]</td> |
---|
69 | [% END %] |
---|
70 | |
---|
71 | </tr> |
---|
72 | [% IF loop.last %]</table>[% END %] |
---|
73 | |
---|
74 | [% END %][% # FOREACH %] |
---|
75 | |
---|
76 | [% END %][% # IF NOT voting %] |
---|
77 | </div> |
---|
78 | <div style="clear: both"></div> |
---|