1 | <!-- $Id$ --> |
---|
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>[% l('Add a voter') %]</p> |
---|
9 | <form action="[% c.uri_for(poll.uid, 'voters') %]" method="POST"> |
---|
10 | <table> |
---|
11 | <tr> |
---|
12 | <td align="left">[% l('Name:') %] </td> |
---|
13 | <td><input type="text" name="id"></td> |
---|
14 | </tr><tr> |
---|
15 | <td align="left">[% l('Email address:') %] </td> |
---|
16 | <td><input type="text" name="mail"></td> |
---|
17 | </tr> |
---|
18 | </table> |
---|
19 | <input type="submit" value="[% l('Add') %]"> |
---|
20 | </form> |
---|
21 | |
---|
22 | <hr> |
---|
23 | <p> |
---|
24 | <a href="[% c.uri_for(poll.uid, 'voters', 'import') %]"> |
---|
25 | [% l('Import the list of voters...') %] |
---|
26 | </a> |
---|
27 | </p> |
---|
28 | |
---|
29 | |
---|
30 | <hr> |
---|
31 | <p>[% l('Send password to voters') %]</p> |
---|
32 | [% IF poll.info.hend %] |
---|
33 | <form action="[% c.uri_for(poll.uid, 'voters') %]" method="POST"> |
---|
34 | [% l('Email language') %]: [% INCLUDE 'includes/locale_select.tt' varname='mail_locale' %]<br> |
---|
35 | <input type="submit" name="mailpasswd" value="[% l('Send password') %]"> |
---|
36 | </form> |
---|
37 | [% ELSE %] |
---|
38 | [% l('Poll date must be set before announcing poll to voters') %] |
---|
39 | [% END %] |
---|
40 | </div> |
---|
41 | |
---|
42 | [% END %] |
---|
43 | |
---|
44 | <div class="box" style="float: right; width: 60%;"> |
---|
45 | |
---|
46 | [% IF NOT poll.voting_count %] |
---|
47 | <p class="alert">[% l('No subscribed voters') %]</p> |
---|
48 | [% ELSE %] |
---|
49 | |
---|
50 | [% FOREACH votingkey = poll.voting_keys %] |
---|
51 | [% voting = poll.voting(votingkey) %] |
---|
52 | |
---|
53 | [% IF loop.first %] |
---|
54 | <table border="1"> |
---|
55 | <tr><th>[% l('Email') %]</th> |
---|
56 | <th>[% l('Status') %]</th> |
---|
57 | <th>[% l('Delete') %]</th> |
---|
58 | </tr> |
---|
59 | [% END %] |
---|
60 | |
---|
61 | <tr> |
---|
62 | |
---|
63 | <td>[% voting.label | html %] [% voting.info.mail | html %]</td> |
---|
64 | <td>[% IF voting.info.passwd %]<i>[% l('password sent') %]</i>[% END %]</td> |
---|
65 | |
---|
66 | [% IF NOT voting.info.date %] |
---|
67 | <td> |
---|
68 | [% IF poll.status != 'AFTER' %] |
---|
69 | <form action="[% c.uri_for(poll.uid, 'voters') %]" method="POST"> |
---|
70 | <input type="hidden" name="delvoting" value="[% voting.votingkey %]"> |
---|
71 | <input type="submit" name="delete" value="[% l('delete') %]"> |
---|
72 | </form> |
---|
73 | [% END %] |
---|
74 | </td> |
---|
75 | [% ELSE %] |
---|
76 | <td>[% voting.info.date %]</td> |
---|
77 | [% END %] |
---|
78 | |
---|
79 | </tr> |
---|
80 | [% IF loop.last %]</table>[% END %] |
---|
81 | |
---|
82 | [% END %][% # FOREACH %] |
---|
83 | |
---|
84 | [% END %][% # IF NOT voting %] |
---|
85 | </div> |
---|
86 | <div style="clear: both"></div> |
---|