Changeset 79


Ignore:
Timestamp:
03/19/09 03:12:46 (15 years ago)
Author:
nanardon
Message:
  • improve results page
Location:
trunk/root
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/root/static/vote.css

    r68 r79  
    55 
    66td { 
     7    padding: 4px; 
     8} 
     9 
     10tr { 
     11    vertical-align: top; 
    712    padding: 4px; 
    813} 
     
    2025        color:#3344FF; 
    2126        font-weight:bold; 
     27} 
     28 
     29ul { 
     30    margin: 0px; 
    2231} 
    2332 
     
    5160    padding: 5px; 
    5261    /* background-color: red; */ 
     62} 
     63 
     64div.box { 
     65    border-style: outset; 
     66    border-width: 5px; 
     67    padding: 1em; 
     68} 
     69 
     70.majabs { 
     71    background-color: #FF9933; 
     72} 
     73 
     74.selected { 
     75    background-color: #FF9999; 
     76} 
     77 
     78.notselected { 
    5379} 
    5480 
  • trunk/root/templates/includes/poll.tt

    r71 r79  
    22[% thisvote = vote.vote_info(voteid) %] 
    33 
    4 <div id="poll_summary"> 
     4<div id="poll_summary" class="box"> 
    55<p id="poll_label">[% thisvote.label | html %]</p> 
    66<p>[% thisvote.description | html %]</p> 
  • trunk/root/templates/includes/poll_results.tt

    r70 r79  
    11[% vote = c.model('Vote') %] 
    22 
    3 <div id="results"> 
     3<div id="results" class="box"> 
     4[% IF vote.list_vote_ballot_needvalid(voteid).size %] 
     5<p>Resultats provisoires:</p> 
     6<p class="alert">Le gestionnaire doit vérifier la validité de certains bulletins</p> 
     7[% ELSE %] 
    48<p>Resultats:</p> 
     9[% END %] 
     10<p>Nombre de choix à retenir: [% vote.vote_info(voteid).choice_count %]</p> 
    511<p>Participations: [% vote.vote_signing_count(voteid) %] / [% vote.vote_voting_count(voteid) %] 
    612[% IF vote.vote_voting_count(voteid) %] 
     
    1622[% FOREACH res = vote.vote_results_nonull(voteid) %] 
    1723[% IF loop.first %] 
     24<p>Score:</p> 
     25<table border="1"><tr> 
     26<th>Légende:</th> 
     27<td class="majabs">Majorité Absolue</td> 
     28<td class="selected">Elus</td> 
     29<td class="notselected">Non élu</td> 
     30</tr></table><br> 
    1831<table border="1"> 
    19 <tr><th>choix</th><th>Nb voix</th><th>%</th><th></th></tr> 
     32<tr><th>Score</th><th>choix</th><th>Nb voix</th><th>%</th><th></th></tr> 
    2033[% END %] 
     34 
     35[% IF res.count != loop.prev.count && loop.count > 0 %] 
     36    [% # If equality, we keep same color, even we are over resullts %] 
     37[% mycount = loop.count %] 
    2138[% IF loop.count <= vote.vote_info(voteid).choice_count %] 
    22 [% IF res.count * 100 / vote.ballot_count_nonull(voteid) > 50 %] 
    23 [% color = ' bgcolor="#FF9933"' %] 
     39[% IF res.count > vote.ballot_count_nonull(voteid) / 2 + 1 %] 
     40[% class = 'majabs' %] 
    2441[% ELSE %] 
    25 [% color = ' bgcolor="#FF9999"' %] 
     42[% class = 'selected' %] 
    2643[% END %] 
    2744[% ELSE %] 
    28 [% color = '' %] 
     45[% class = 'notselected' %] 
    2946[% END %] 
    30 <tr> 
    31 <td[% color %]>[% res.value | html %]</td> 
    32 <td[% color %]>[% res.count %]</td> 
    33 <td[% color %]>[% res.count * 100 / vote.ballot_count_nonull(voteid) | format('%.2f') %]</td> 
    34 <td[% color %]><img src="[% c.uri_for('/static', 'images', 'green-v.png') %]"  
     47[% END %] 
     48<tr class="[% class %]"> 
     49<td>[% mycount %]</td> 
     50<td>[% res.value | html %]</td> 
     51<td>[% res.count %]</td> 
     52<td>[% res.count * 100 / vote.ballot_count_nonull(voteid) | format('%.2f') %]</td> 
     53<td><img src="[% c.uri_for('/static', 'images', 'green-v.png') %]"  
    3554height="10px" width="[% res.count * 400 / vote.ballot_count_nonull(voteid) | format('%d') %]px"></td> 
    3655</tr> 
     56 
    3757[% IF loop.last %] 
    3858</table> 
     
    4666[% FOREACH id = vote.list_vote_ballot(voteid) %] 
    4767[% IF loop.first %] 
    48 <div id="ballot_list"> 
     68<div id="ballot_list" class="box"> 
    4969<p>Liste des bulletins:</p> 
    5070<table border="1"> 
  • trunk/root/templates/includes/signing_list.tt

    r47 r79  
    44[% voting = vote.voting_info(id) %] 
    55[% IF loop.first %] 
    6 <div id="voting_list"> 
     6<div id="voting_list" class="box"> 
    77<p>Liste des votants:</p> 
    88<table border="1"> 
    9 <tr><th>Votant</th><th>Date du vote</th></tr> 
     9<tr><th>Numéro</th><th>Votant</th><th>Date du vote</th></tr> 
    1010[% END %] 
    1111<tr> 
     12<td>[% loop.count %]</td> 
    1213<td>[% voting.label | html %] [% voting.mail | html %]</td> 
    1314<td>[% voting.date %]</td> 
Note: See TracChangeset for help on using the changeset viewer.