Changeset 206 for trunk/root


Ignore:
Timestamp:
04/16/09 00:16:56 (15 years ago)
Author:
nanardon
Message:
  • kill some old function usage
Location:
trunk/root/templates
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/root/templates/admin/includes/poll_settings.tt

    r205 r206  
    88<form action="[% c.uri_for(voteid) %]" method="POST"> 
    99 
    10 [% thisvote = vote.vote_info(voteid) %] 
    11  
    12 Label: <input type="text" name="label" value="[% c.req.param('label') || thisvote.label | html %]"> 
     10Label: <input type="text" name="label" value="[% c.req.param('label') || poll.info('label') | html %]"> 
    1311<br> 
    1412Description:<br> 
    15 <textarea name="description" cols="60" rows="4">[% c.req.param('description') || thisvote.description | html %]</textarea> 
     13<textarea name="description" cols="60" rows="4">[% c.req.param('description') || poll.info('description') | html %]</textarea> 
    1614<br> 
    1715<hr> 
     
    2523 
    2624Debut du vote:<br> 
    27 Date: <input type="text" name="dstart" value="[% c.req.param('dstart') || thisvote.dstart | html %]"> 
     25Date: <input type="text" name="dstart" value="[% c.req.param('dstart') || poll.info('dstart') | html %]"> 
    2826<A HREF="#" onClick="cal13.select(document.forms[0].dstart,'anchor13','dd/MM/yyyy'); return false;" TITLE="cal13.select(document.forms[0].dstart,'anchor13','dd/MM/yyyy'); return false;" NAME="anchor13" ID="anchor13">select</A> 
    29 Heure: <input type="text" size=9 name="hstart" value="[% c.req.param('hstart') || thisvote.hstart | html %]"> 
     27Heure: <input type="text" size=9 name="hstart" value="[% c.req.param('hstart') || poll.info('hstart') | html %]"> 
    3028<br> 
    3129Fin du vote:<br> 
    32 Date: <input type="text" name="dend" value="[% c.req.param('dend') || thisvote.dend | html %]"> 
     30Date: <input type="text" name="dend" value="[% c.req.param('dend') || poll.info('dend') | html %]"> 
    3331<A HREF="#" onClick="cal13.select(document.forms[0].dend,'anchor14','dd/MM/yyyy',(document.forms[0].dend.value=='')?document.forms[0].dstart.value:null); return false;" TITLE="cal13.select(document.forms[0].dend,'anchor14','dd/MM/yyyy',(document.forms[0].dend.value=='')?document.forms[0].dstart.value:null); return false;" NAME="anchor14" ID="anchor14">select</A> 
    34 Heure: <input type="text" size=9 name="hend" value="[% c.req.param('hend') || thisvote.hend | html %]"> 
     32Heure: <input type="text" size=9 name="hend" value="[% c.req.param('hend') || poll.info('hend') | html %]"> 
    3533<br> 
    3634<hr> 
  • trunk/root/templates/admin/index.tt

    r47 r206  
    11[% vote = c.model('Vote') %] 
     2[% poll = c.model('Vote').poll('voteid') %] 
    23 
    3 [% FOREACH voteid = vote.list_comming_vote %] 
    4 <a href="[% c.uri_for('/admin', voteid) %]">[% vote.vote_info(voteid).label | html %]</a> 
     4[% FOREACH voteid = c.model('Vote').list_comming_vote %] 
     5<a href="[% c.uri_for('/admin', voteid) %]">[% c.model('Vote').poll('voteid').info('label') | html %]</a> 
    56<br> 
    67[% END %] 
  • trunk/root/templates/admin/login.tt

    r186 r206  
    11<!-- $Id$ --> 
    22[% vote = c.model('Vote') %] 
     3[% poll = c.model('Vote').poll(voteid) %] 
    34 
    45<div id="admin_login" class="login_box"> 
    56<form action="[% c.uri_for('/admin', voteid) %]" method="POST"> 
    6 <p>Acc&egrave;s &agrave; l'interface d'administration du vote <b><i>[% vote.vote_info(voteid).label | html %]</i></b></p> 
     7<p>Acc&egrave;s &agrave; l'interface d'administration du vote <b><i>[% poll.info('label') | html %]</i></b></p> 
    78<p>Veuillez saisir le mot de passe : <input type="password" name="[% 'vpass' _ voteid %]"> 
    89<input type="submit"></p> 
  • trunk/root/templates/ballot/default.tt

    r192 r206  
    11[% vote = c.model('Vote') %] 
    2  
    3 [% thisvote = vote.vote_info(voteid) %] 
     2[% poll = c.model('Vote').poll(voteid) %] 
    43 
    54<div id="ballot" class="ballot"> 
    65<form action="[% c.uri_for(voteid) %]" method="POST"> 
    7 <p><b>Vote: [% thisvote.label | html %]</b></p> 
     6<p><b>Vote: [% poll.info('label') | html %]</b></p> 
    87[% IF c.req.param('ballot') %] 
    98<p>Confirmez votre vote:</p> 
    109[% ELSE %] 
    1110[% IF vote_error %]<p class="alert">Erreur: [% vote_error %]</p>[% END %] 
    12 <p>[% thisvote.description | html | html_line_break %]</p> 
    13 <p>[% thisvote.choice_count %] choix possibles:</p> 
     11<p>[% poll.info('description') | html | html_line_break %]</p> 
     12<p>[% poll.info('choice_count') %] choix possibles:</p> 
    1413[% END %] 
    1514<hr> 
  • trunk/root/templates/ballot/index.tt

    r47 r206  
    11[% vote = c.model('Vote') %] 
     2[% poll = c.model('Vote').poll(voteid) %] 
    23 
    34[% voteids = vote.list_running_vote %] 
     
    67 
    78[% FOREACH voteid = voteids %] 
    8 <a href="[% c.uri_for('/ballot', voteid) %]">[% vote.vote_info(voteid).label | html %]</a> 
     9<a href="[% c.uri_for('/ballot', voteid) %]">[% poll.info('label') | html %]</a> 
    910<br> 
    1011[% END %] 
  • trunk/root/templates/default.tt

    r167 r206  
    1010[% END %] 
    1111<tr> 
    12 <td><lu><li><a href="[% c.uri_for( '/vote', id ) %]">[% vote.vote_info(id).label | html %]</a></lu></td></td> 
     12<td><lu><li><a href="[% c.uri_for( '/vote', id ) %]">[% c.model('Vote').poll(id).info('label') | html %]</a></lu></td></td> 
    1313<td>&gt;<a href="[% c.uri_for( '/ballot', id ) %]"> Voter</a></td> 
    1414</tr> 
     
    2828[% END %] 
    2929<tr> 
    30 <td><lu><li><a href="[% c.uri_for( 'vote', id ) %]">[% vote.vote_info(id).label | html %]</a></li></lu></td> 
     30<td><lu><li><a href="[% c.uri_for( 'vote', id ) %]">[% c.model('Vote').poll(id).info('label') | html %]</a></li></lu></td> 
    3131<td>&gt;<a href="[% c.uri_for( '/admin', id ) %]"> Administrer</a></td> 
    3232</tr> 
     
    4747[% END %] 
    4848<tr> 
    49 <td><lu><li><a href="[% c.uri_for( 'vote', id ) %]">[% vote.vote_info(id).label | html %]</a></lu></td></td> 
     49<td><lu><li><a href="[% c.uri_for( 'vote', id ) %]">[% c.model('Vote').poll(id).info('label') | html %]</a></lu></td></td> 
    5050</tr> 
    5151[% IF loop.last %] 
  • trunk/root/templates/includes/header.tt

    r109 r206  
    1919    [% IF voteid %] 
    2020    :: <a href="[% c.uri_for('/vote', voteid) %]"> 
    21         Votre vote: [% c.model('Vote').vote_info(voteid).label | truncate(40) | html %] 
     21        Votre vote: [% c.model('Vote').poll(voteid).info('label') | truncate(40) | html %] 
    2222    </a> 
    2323    [% END %] 
  • trunk/root/templates/includes/poll.tt

    r126 r206  
    11[% vote = c.model('Vote') %] 
    2 [% thisvote = vote.vote_info(voteid) %] 
     2[% poll = c.model('Vote').poll(voteid) %] 
    33 
    44<div id="poll_summary" class="box" style="clear: both;"> 
    55<div style="float: left; width: 70%;"> 
    6 <p id="poll_label">[% thisvote.label | html %]</p> 
    7 <p>[% thisvote.description | html | html_line_break %]</p> 
    8 [% IF thisvote.dstart && thisvote.dend %] 
    9 <p>Scrutin ouvert du <b>[% thisvote.dstart _ ' ' _ thisvote.hstart | html %]</b> au 
    10 <b>[% thisvote.dend _ ' ' _ thisvote.hend | html %]</b></p> 
     6<p id="poll_label">[% poll.info('label') | html %]</p> 
     7<p>[% poll.info('description') | html | html_line_break %]</p> 
     8[% IF poll.info('dstart') && poll.info('dend') %] 
     9<p>Scrutin ouvert du <b>[% poll.info('dstart') _ ' ' _ poll.info('hstart') | html %]</b> au 
     10<b>[% poll.info('dend') _ ' ' _ poll.info('hend') | html %]</b></p> 
    1111[% END %] 
    12 Ont voté: [% vote.vote_signing_count(voteid) %] / [% vote.vote_voting_count(voteid) %]<br> 
    13 Bulletins: [% vote.vote_ballot_count(voteid) %] 
    14 [% IF vote.vote_signing_count(voteid) != vote.vote_ballot_count(voteid) %] 
     12Ont voté: [% poll.signing_count %] / [% poll.voting_count %]<br> 
     13Bulletins: [% poll.ballot_count %] 
     14[% IF poll.signing_count != poll.ballot_count %] 
    1515<p class="alert">Le nombre de bulletins et le nombre de personnes ayant voté divergent, 
    1616suspicion de tricherie</p> 
    1717[% END %] 
    1818</div> 
    19 [% FOREACH item = vote.vote_choices(voteid) %] 
     19[% FOREACH item = poll.choices %] 
    2020[% IF loop.first %] 
    2121<div style="float: right; width: 20%; top: 0px;" class="box"> 
     
    2323<ol style="padding-left:15px; margin:5px;"> 
    2424[% END %] 
    25 <li>[% vote.choice_info(item).label | html %]</li> 
     25<li>[% poll.choice(item).info.label | html %]</li> 
    2626[% IF loop.last %] 
    2727</ol> 
  • trunk/root/templates/includes/poll_results.tt

    r193 r206  
    1414<p>Resultats:</p> 
    1515[% END %] 
    16 <p>Nombre de choix à retenir: [% vote.vote_info(voteid).choice_count %]</p> 
     16<p>Nombre de choix à retenir: [% poll.info('choice_count') %]</p> 
    1717<p>Participations: [% vote.vote_signing_count(voteid) %] / [% vote.vote_voting_count(voteid) %] 
    1818[% IF vote.vote_voting_count(voteid) %] 
     
    4242    [% # If equality, we keep same color, even we are over resullts %] 
    4343[% mycount = loop.count %] 
    44 [% IF loop.count <= vote.vote_info(voteid).choice_count %] 
     44[% IF loop.count <= poll.info('choice_count') %] 
    4545[% IF res.count >= vote.absolute_majority %] 
    4646[% class = 'majabs' %] 
     
    7878<tr><th>numéro</th><th>Id</th> 
    7979<th>contenu (=> corrigé en) 
    80 [% IF vote.vote_info(voteid).free_choice %] 
     80[% IF poll.info('free_choice') %] 
    8181<br>(*: hors liste) 
    8282[% END %] 
Note: See TracChangeset for help on using the changeset viewer.