source: trunk/root/templates/admin/voters.tt

Last change on this file was 434, checked in by nanardon, 14 years ago
  • choosing locale for mail does not affect the global application
  • using generic way to setup locale, this also fix title set in perl code as locale are set before
  • Property svn:keywords set to Id Rev
File size: 2.1 KB
RevLine 
[227]1<!-- $Id$ -->
[205]2[% poll = c.model('Vote').poll(voteid) %]
[167]3
4[% INCLUDE 'includes/admin_menu.tt' %]
5
[205]6[% IF poll.status() != 'AFTER' %]
[168]7<div style="float: left; width: 30%;" class="box">
[392]8<p>[% l('Add a voter') %]</p>
[315]9<form action="[% c.uri_for(poll.uid, 'voters') %]" method="POST">
[415]10<table>
11<tr>
12<td align="left">[% l('Name:') %]&nbsp;</td>
13<td><input type="text" name="id"></td>
14</tr><tr>
15<td align="left">[% l('Email address:') %]&nbsp;</td>
16<td><input type="text" name="mail"></td>
17</tr>
18</table>
[282]19<input type="submit" value="[% l('Add') %]">
[167]20</form>
[315]21
[167]22<hr>
[315]23<p>
24    <a href="[% c.uri_for(poll.uid, 'voters', 'import') %]">
[386]25        [% l('Import the list of voters...') %]
[315]26    </a>
27</p>
28
[406]29
[167]30<hr>
[315]31<p>[% l('Send password to voters') %]</p>
[346]32[% IF poll.info.hend %]
[315]33<form action="[% c.uri_for(poll.uid, 'voters') %]" method="POST">
[434]34[% l('Email language') %]: [% INCLUDE 'includes/locale_select.tt' varname='mail_locale' %]<br>
[379]35<input type="submit" name="mailpasswd" value="[% l('Send password') %]">
[167]36</form>
[346]37[% ELSE %]
[385]38[% l('Poll date must be set before announcing poll to voters') %]
[346]39[% END %]
[168]40</div>
41
42[% END %]
43
44<div class="box" style="float: right; width: 60%;">
45
[207]46[% IF NOT poll.voting_count %]
[323]47<p class="alert">[% l('No subscribed voters') %]</p>
[167]48[% ELSE %]
49
[207]50[% FOREACH votingkey = poll.voting_keys %]
51[% voting = poll.voting(votingkey) %]
[168]52
[167]53[% IF loop.first %]
54<table border="1">
[395]55<tr><th>[% l('Email') %]</th>
56    <th>[% l('Status') %]</th>
57    <th>[% l('Delete') %]</th>
58</tr>
[167]59[% END %]
[168]60
[167]61<tr>
[168]62
[207]63<td>[% voting.label | html %] [% voting.info.mail | html %]</td>
[282]64<td>[% IF voting.info.passwd %]<i>[% l('password sent') %]</i>[% END %]</td>
[168]65
[207]66[% IF NOT voting.info.date %]
[168]67<td>
[205]68[% IF poll.status != 'AFTER' %]
[429]69<form action="[% c.uri_for(poll.uid, 'voters') %]" method="POST">
70<input type="hidden" name="delvoting" value="[% voting.votingkey %]">
[282]71<input type="submit" name="delete" value="[% l('delete') %]">
[429]72</form>
[168]73[% END %]
74</td>
[167]75[% ELSE %]
[207]76<td>[% voting.info.date %]</td>
[167]77[% END %]
78
79</tr>
[168]80[% IF loop.last %]</table>[% END %]
[167]81
[168]82[% END %][% # FOREACH %]
83
84[% END %][% # IF NOT voting %]
85</div>
86<div style="clear: both"></div>
Note: See TracBrowser for help on using the repository browser.