[% USE Mail %] [%- poll = c.model('Vote').poll(voteid) %] \maketitle \tableofcontents{} \section{Description du vote} [%- poll.info.description -%] [% poll.info.choice_count %] choix étaient à retenir. Etait candidats: [%- FOREACH chk = poll.choices -%] [% ch = poll.choice(chk) -%] [%- IF loop.first -%] \begin{enumerate}[% END -%] \item [% ch.info.label %] [%- IF loop.last -%] \end{enumerate} [%- END -%] [%- END -%] Nombre d'électeurs: [% poll.voting_count %]. \section{Résultats} \subsection{Participation} \begin{tabular}{|l|c|c|} \hline Nombre de bulltetins&[% poll.ballot_count %]&\\ \hline Participation&[% poll.signing_count %]&[% poll.signing_count / poll.voting_count * 100 | format('%.2f \%%') IF poll.voting_count %]\\ \hline Nombre de bulltetins&[% poll.ballot_count %]&\\ \hline Nombre de voix exprimée&[% poll.ballot_count_nonull %]&[% poll.ballot_count_nonull / poll.ballot_count * 100 | format('%.2f \%%') IF poll.ballot_count %]\\ \hline \end{tabular} \subsection{Scores} [%- IF poll.ballot_count_nonull -%] [%- FOREACH res = poll.results_nonull -%] [%- IF res.count != loop.prev.count && loop.count > 0 -%] [%- mycount = loop.count -%] [%- END -%] [%- IF loop.count <= poll.info.choice_count -%] [%- IF res.count >= poll.ballot_count_nonull / 2 + 1 -%] [%- comment = 'majorité absolue' -%] [%- ELSE -%] [%- comment = 'Elu' -%] [%- END -%] [%- ELSE -%] [%- comment = '' -%] [%- END -%] [%- IF loop.first -%] \begin{tabular}{|r|l|r|c|l|} \hline ordre&choix&nb de voix&\%&commentaire\\ \hline \hline [% END %] [% mycount %]& [% res.value %]& [% res.count %]& [% res.count * 100 / poll.ballot_count_nonull | format('%.2f') %]& [% comment %]\\ \hline [%- IF loop.last -%] \end{tabular} [%- END %] [%- END -%] [%- ELSE -%] [%- END -%] \section{Données du vote} \subsection{Liste d'émargement} [% FOREACH vkey = poll.voting_keys %] [% voting = poll.voting(vkey) %] [% '\begin{enumerate}' IF loop.first %] \item [% voting.info.id _ ' ' IF voting.info.id %]\verb+[% voting.info.mail | mail %]+ [% "\nA voté\n" IF voting.info.date %] [% '\end{enumerate}' IF loop.last -%] [% END %] \subsection{Liste des bulletins} [% FOREACH id = poll.list_ballot %] [% invalid = '#' _ vote.ballot_info(id).invalid %] [% IF loop.first %] \begin{enumerate} [% END %] \item \verb+[% id %]+ [% "\textbf{invalidé}" IF invalid == '#1' %] [%- ballot = poll.ballot(id) -%] [%- FOREACH item = ballot.items -%] [% '\begin{enumerate}' IF loop.first %] \item [% item.v %] [% '(' _ item.corrected _ ')' IF item.corrected -%] [% '\end{enumerate}' IF loop.last -%] [% END %] [% IF loop.last %] \end{enumerate} [% END %] [% END %]