Changeset 218 for trunk/root/latex


Ignore:
Timestamp:
04/18/09 17:20:17 (15 years ago)
Author:
nanardon
Message:
  • improve poll results view
Location:
trunk/root/latex
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/root/latex/poll_report.tt

    r217 r218  
    66\tableofcontents{} 
    77 
    8 \section{Description du vote} 
    9  
    10 [%- poll.info('description') -%] 
    11  
    12  
    13 [% poll.info('choice_count') %] choix étaient à retenir. 
    14  
    15 Etait 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  
    29 Nombre d'électeurs: [% poll.voting_count %]. 
    30  
    31 \section{Résultats} 
    32  
    33 \subsection{Participation} 
    34  
    35 \begin{tabular}{|l|c|c|} 
    36 \hline 
    37 Nombre de bulltetins&[% poll.ballot_count %]&\\ 
    38 \hline 
    39 Participation&[% poll.signing_count %]&[% poll.signing_count / poll.voting_count * 100 | format('%.2f \%%') IF poll.voting_count %]\\ 
    40 \hline 
    41 Nombre de bulltetins&[% poll.ballot_count %]&\\ 
    42 \hline 
    43 Nombre 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 -%] 
    51  
    52 [% IF res.elected %] 
    53 [% IF res.abs_maj %] 
    54 [%- comment = 'Elu, majorité absolue' -%] 
    55 [%- ELSE -%] 
    56 [%- comment = 'Elu' -%] 
    57 [%- END -%] 
    58 [%- ELSE -%] 
    59 [%- comment = '' -%] 
    60 [%- END -%] 
    61  
    62 [%- IF loop.first -%] 
    63 \begin{tabular}{|r|l|r|c|l|} 
    64 \hline 
    65 ordre&choix&nb de voix&\%&commentaire\\ 
    66 \hline 
    67 \hline 
    68 [% END %] 
    69 [% res.order %]& [% res.value %]& [% res.count %]& [% res.count * 100 / poll.ballot_count_nonull | format('%.2f') %]& [% comment %]\\ 
    70 \hline 
    71  
    72 [%- IF loop.last -%] 
    73 \end{tabular} 
    74 [%- END %] 
    75 [%- END -%] 
    76 [%- ELSE -%] 
    77 [%- END -%] 
     8[% INCLUDE 'includes/info.tt' %] 
    789 
    7910\section{Données du vote} 
    8011 
    81 \subsection{Liste d'émargement} 
     12[% INCLUDE 'includes/voting.tt' %] 
    8213 
    83 [% FOREACH vkey = poll.voting_keys %] 
    84 [% voting = poll.voting(vkey) %] 
    85 [% '\begin{enumerate}' IF loop.first %] 
    86 \item [% voting.info.id _ ' ' IF voting.info.id %]\verb+[% voting.info.mail | mail %]+ 
    87 [% "\nA voté\n" IF voting.info.date %] 
    88 [% '\end{enumerate}' IF loop.last -%] 
    89 [% END %] 
     14[% INCLUDE 'includes/ballot.tt' %] 
    9015 
    91 \subsection{Liste des bulletins} 
    92  
    93 [% FOREACH id = poll.ballot_keys %] 
    94 [%- ballot = poll.ballot(id) -%] 
    95 [% invalid = '#' _ ballot.info.invalid %] 
    96 [% IF loop.first %] 
    97 \begin{enumerate} 
    98 [% END %] 
    99 \item \verb+[% id %]+ [% "\textbf{invalidé}" IF invalid == '#1' %]  
    100  
    101 [%- FOREACH item = ballot.items -%] 
    102 [% '\begin{enumerate}' IF loop.first %] 
    103 \item [% item.v %] [% '(' _ item.corrected _ ')' IF item.corrected -%] 
    104  
    105 [% '\end{enumerate}' IF loop.last -%] 
    106 [% END %] 
    107 [% IF loop.last %] 
    108 \end{enumerate} 
    109 [% END %] 
    110 [% END %] 
Note: See TracChangeset for help on using the changeset viewer.