Changeset 40 for trunk/root


Ignore:
Timestamp:
03/16/09 09:45:45 (15 years ago)
Author:
nanardon
Message:
  • color first results which should be elected
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/root/templates/includes/poll_results.tt

    r38 r40  
    1919<tr><th>choix</th><th>Nb voix</th><th>%</th><th></th></tr> 
    2020[% END %] 
     21[% IF loop.count <= vote.vote_info(voteid).choice_count %] 
     22[% IF res.count * 100 / vote.ballot_count_nonull(voteid) > 50 %] 
     23[% color = ' bgcolor="#FF9933"' %] 
     24[% ELSE %] 
     25[% color = ' bgcolor="#FF9999"' %] 
     26[% END %] 
     27[% ELSE %] 
     28[% color = '' %] 
     29[% END %] 
    2130<tr> 
    22 <td>[% res.value | html %]</td> 
    23 <td>[% res.count %]</td> 
    24 <td>[% res.count * 100 / vote.ballot_count_nonull(voteid) | format('%.2f') %]</td> 
    25 <td><img src="[% c.uri_for('/static', 'images', 'green-v.png') %]"  
     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') %]"  
    2635height="10px" width="[% res.count * 400 / vote.ballot_count_nonull(voteid) | format('%d') %]px"></td> 
    2736</tr> 
Note: See TracChangeset for help on using the changeset viewer.