source: trunk/root/latex/poll_report.tt @ 207

Last change on this file since 207 was 207, checked in by nanardon, 15 years ago
  • cleanup old functions and switch everything to new objects
File size: 2.6 KB
Line 
1[% USE Mail %]
2[%- poll = c.model('Vote').results(voteid) %]
3
4\maketitle
5
6\tableofcontents{}
7
8\section{Description du vote}
9
10[%- poll.info.description -%]
11
12
13[% poll.info.choice_count %] choix étaient à retenir.
14
15Etait candidats:
16
17[%- FOREACH chk = poll.choices -%]
18[% ch = poll.choice(chk) -%]
19[%- IF loop.first -%]
20\begin{enumerate}[% END -%]
21\item [% ch.info.label %]
22
23[%- IF loop.last -%]
24
25\end{enumerate}
26[%- END -%]
27[%- END -%]
28
29Nombre d'électeurs: [% poll.voting_count %].
30
31\section{Résultats}
32
33\subsection{Participation}
34
35\begin{tabular}{|l|c|c|}
36\hline
37Nombre de bulltetins&[% poll.ballot_count %]&\\
38\hline
39Participation&[% poll.signing_count %]&[% poll.signing_count / poll.voting_count * 100 | format('%.2f \%%') IF poll.voting_count %]\\
40\hline
41Nombre de bulltetins&[% poll.ballot_count %]&\\
42\hline
43Nombre de voix exprimée&[% poll.ballot_count_nonull %]&[% poll.ballot_count_nonull / poll.ballot_count * 100 | format('%.2f \%%') IF poll.ballot_count %]\\
44\hline
45\end{tabular}
46
47\subsection{Scores}
48
49[%- IF poll.ballot_count_nonull -%]
50[%- FOREACH res = poll.results_nonull -%]
51[%- IF res.count != loop.prev.count && loop.count > 0 -%]
52[%- mycount = loop.count -%]
53[%- END -%]
54
55[%- IF loop.count <= poll.info.choice_count -%]
56[%- IF res.count >= poll.absolute_majority -%]
57[%- comment = 'majorité absolue' -%]
58[%- ELSE -%]
59[%- comment = 'Elu' -%]
60[%- END -%]
61[%- ELSE -%]
62[%- comment = '' -%]
63[%- END -%]
64
65[%- IF loop.first -%]
66\begin{tabular}{|r|l|r|c|l|}
67\hline
68ordre&choix&nb de voix&\%&commentaire\\
69\hline
70\hline
71[% END %]
72[% mycount %]& [% res.value %]& [% res.count %]& [% res.count * 100 / poll.ballot_count_nonull | format('%.2f') %]& [% comment %]\\
73\hline
74
75[%- IF loop.last -%]
76\end{tabular}
77[%- END %]
78[%- END -%]
79[%- ELSE -%]
80[%- END -%]
81
82\section{Données du vote}
83
84\subsection{Liste d'émargement}
85
86[% FOREACH vkey = poll.voting_keys %]
87[% voting = poll.voting(vkey) %]
88[% '\begin{enumerate}' IF loop.first %]
89\item [% voting.info.id _ ' ' IF voting.info.id %]\verb+[% voting.info.mail | mail %]+
90[% "\nA voté\n" IF voting.info.date %]
91[% '\end{enumerate}' IF loop.last -%]
92[% END %]
93
94\subsection{Liste des bulletins}
95
96[% FOREACH id = poll.ballot_keys %]
97[%- ballot = poll.ballot(id) -%]
98[% invalid = '#' _ ballot.info.invalid %]
99[% IF loop.first %]
100\begin{enumerate}
101[% END %]
102\item \verb+[% id %]+ [% "\textbf{invalidé}" IF invalid == '#1' %]
103
104[%- FOREACH item = ballot.items -%]
105[% '\begin{enumerate}' IF loop.first %]
106\item [% item.v %] [% '(' _ item.corrected _ ')' IF item.corrected -%]
107
108[% '\end{enumerate}' IF loop.last -%]
109[% END %]
110[% IF loop.last %]
111\end{enumerate}
112[% END %]
113[% END %]
Note: See TracBrowser for help on using the repository browser.