source: trunk/root/templates/admin/default.tt @ 47

Last change on this file since 47 was 47, checked in by nanardon, 15 years ago
  • CSS improvements
  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1[% vote = c.model('Vote') %]
2
3[% IF vote.vote_status(voteid) == 'BEFORE' %]
4<table border="1">
5<tr><th>Vote</th><th>Possibilité de vote</th></tr>
6<tr>
7<td valign="TOP">
8<form action="[% c.uri_for(voteid) %]">
9
10[% thisvote = vote.vote_info(voteid) %]
11
12Label: <input type="text" name="label" value="[% c.req.param('label') || thisvote.label | html %]">
13<br>
14Description: <textarea name="description">[% c.req.param('description') || thisvote.description | html %]</textarea>
15<br>
16Debut du vote:
17<input type="text" name="start" value="[% c.req.param('start') || thisvote.start | html %]">
18<br>
19Fin du vote:
20<input type="text" name="end" value="[% c.req.param('end') || thisvote.end | html %]">
21<br>
22Nombre de choix possible:
23<input type="text" name="choice_count" value="[% c.req.param('choice_count') || thisvote.choice_count | html %]">
24<br>
25Nombre de choix libres:
26<input type="text" name="free_choice" value="[% c.req.param('free_choice') || thisvote.free_choice | html %]">
27<br>
28<input type="submit">
29</form>
30</td>
31<td valign="TOP">
32[% FOREACH choice = vote.vote_choices(voteid) %]
33<form action="[% c.uri_for(voteid) %]">
34[% loop.count %] - [% vote.choice_info(choice).label | html %]
35<input type="hidden" name="delch" value="[% vote.choice_info(choice).key %]">
36<input type="submit" name="del" value="Effacer">
37</form>
38<br>
39[% END %]
40<form action="[% c.uri_for(voteid) %]">
41Ajouter un choix:<br>
42<input type="text" name="addch">
43<input type="submit">
44</form>
45</td>
46</tr>
47</table>
48
49<hr>
50
51<table border="1">
52<tr>
53<td valign="TOP">
54[% signing = vote.vote_voting(voteid) %]
55[% FOREACH thisvoting = signing %]
56[% voting = vote.voting_info(thisvoting) %]
57<form action="[% c.uri_for(voteid) %]">
58<input type="hidden" name="delvoting" value="[% voting.vkey %]">
59[% voting.label | html %] [% voting.mail | html %]
60[% IF voting.passwd %]<i>(pass envoyé)</i>[% END %]
61<input type="submit" name="delete" value="delete"><br>
62</form>
63[% END %]
64</td>
65<td valign="TOP">
66<form action="[% c.uri_for(voteid) %]">
67Login: <input type="text" name="id"><br>
68Mail: <input type="text" name="mail"><br>
69<input type="submit">
70</form>
71<hr>
72<form method="POST" ENCTYPE="multipart/form-data" action="[% c.uri_for(voteid) %]">
73<input type="file" name="votinglist"><br>
74<input type="checkbox" name="delete">Effacer la liste des votants<br>
75<input type="submit">
76</form>
77<hr>
78<form action="[% c.uri_for(voteid) %]">
79<input type="submit" name="mailpasswd" value="Envoyer les mot de passe">
80</form>
81</td>
82</tr>
83</table>
84
85[% ELSE %]
86
87[% INCLUDE 'includes/poll.tt' %]
88
89[% FOREACH untrusted = vote.vote_ballot_untrusted_values(voteid) %]
90[% IF loop.first %]
91<div id="map_ballot">
92<p>Remapper les valeurs des bulletins</p>
93<table border="1">
94<tr><th>Valeur saisie</th><th>Valeur à considérer</th></tr>
95[% END %]
96<tr>
97<td>[% untrusted | html %]</td>
98<td>
99    <form action="[% c.uri_for('/admin', voteid) %]" method="POST">
100    <input type="hidden" name="mapfrom" value="[% untrusted | html %]">
101    <select name="mapto">
102    [% FOREACH v = vote.vote_ballot_values(voteid) %]
103        [% NEXT IF v == untrusted %]
104        <option>[% v | html %]</options>
105    [% END %]
106    </select>
107    <input type="submit">
108    </form>
109</td>
110</tr>
111[% IF loop.last %]
112</table>
113</div>
114[% END %]
115[% END %]
116
117[% FOREACH bid = vote.list_vote_ballot_needvalid(voteid) %]
118    [% IF loop.first %]
119    <div id="ballot_to_valid">
120    <p>Bulletins à valider:</p>
121    <form action="[% c.uri_for(voteid) %]">
122    <table border="1">
123    [% END %]
124<tr>
125<td>[% bid %]</td>
126<td>
127[% FOREACH item = vote.ballot_items(bid) %]
128[% loop.count %]- [% item.v %]<br>
129[% END %]
130</td>
131<td>
132<input type="radio" name="[% bid %]" value="valid">est valide<br>
133<input type="radio" name="[% bid %]" value="invalid">n'est pas valide<br>
134</td>
135</tr>
136    [% IF loop.last %]
137    </table>
138    <input type="submit">
139    </form>
140    </div>
141    [% END %]
142[% END %]
143[% END %]
Note: See TracBrowser for help on using the repository browser.