Last change
on this file since 21 was
21,
checked in by nanardon, 15 years ago
|
- show ballot list in poll results
|
File size:
1.3 KB
|
Line | |
---|
1 | [% vote = c.model('Vote') %] |
---|
2 | |
---|
3 | [% INCLUDE 'includes/poll.tt' %] |
---|
4 | |
---|
5 | [% SWITCH vote.vote_status(voteid) %] |
---|
6 | [% CASE 'RUNNING' %] |
---|
7 | <p>en cours</p> |
---|
8 | [% CASE 'BEFORE' %] |
---|
9 | <p>Avant</p> |
---|
10 | [% CASE 'AFTER' %] |
---|
11 | <p>Resultats:</p> |
---|
12 | Nombre de bulletin exprimés: [% vote.ballot_count_nonull(voteid) %] |
---|
13 | [% IF vote.ballot_count(voteid) %] |
---|
14 | ([% vote.ballot_count_nonull(voteid) * 100 / vote.ballot_count(voteid) %]%) |
---|
15 | [% END %] |
---|
16 | <br> |
---|
17 | |
---|
18 | <table border="1"> |
---|
19 | <tr><th>choix</th><th>Nb voix</th><th>%</th><th></th></tr> |
---|
20 | [% FOREACH res = vote.vote_results_nonull(voteid) %] |
---|
21 | <tr> |
---|
22 | <td>[% res.value | html %]</td> |
---|
23 | <td>[% res.count %]</td> |
---|
24 | <td>[% res.count * 100 / vote.ballot_count_nonull(voteid) %]</td> |
---|
25 | <td><img src="[% c.uri_for('/static', 'images', 'green-h.png') %]" |
---|
26 | height="10px" width="[% res.count * 300 / vote.ballot_count_nonull(voteid) %]px"></td> |
---|
27 | </tr> |
---|
28 | [% END %] |
---|
29 | </table> |
---|
30 | |
---|
31 | Liste des bulletins: |
---|
32 | <table border="1"> |
---|
33 | <tr><th>numéro</th><th>Id</th><th>contenu</th></tr> |
---|
34 | [% FOREACH id = vote.list_vote_ballot(voteid) %] |
---|
35 | <tr> |
---|
36 | <td>[% loop.count %]</td> |
---|
37 | <td>[% id | html %]</td> |
---|
38 | <td> |
---|
39 | [% FOREACH item = [ vote.ballot_items(id) ] %] |
---|
40 | [% item.v %]<br> |
---|
41 | [% END %] |
---|
42 | </td> |
---|
43 | </tr> |
---|
44 | [% END %] |
---|
45 | </table> |
---|
46 | [% END %] |
---|
47 | |
---|
48 | [% signing = [ vote.vote_signing(voteid) ] %] |
---|
49 | [% FOREACH voting = signing %] |
---|
50 | [% voting.id | html %] [% voting.date %]<br> |
---|
51 | [% END %] |
---|
52 | |
---|
Note: See
TracBrowser
for help on using the repository browser.