Changeset 207


Ignore:
Timestamp:
04/16/09 02:33:03 (15 years ago)
Author:
nanardon
Message:
  • cleanup old functions and switch everything to new objects
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Vote/Controller/Ballot.pm

    r206 r207  
    4747    my $password = $c->session->{password} || $c->req->param('password'); 
    4848 
    49     if (!$c->model('Vote')->auth_voting($id, $mail, $password)) { 
     49    if (!$c->model('Vote')->poll($id)->auth_voting($mail, $password)) { 
    5050        $c->stash->{page}{title} = $poll->info('label') . ': Login'; 
    5151        $c->delete_session('invalid user/pass'); 
     
    7373    my $vote = $c->model('Vote'); 
    7474    my %choices; 
    75     foreach ($vote->vote_choices($id)) { 
    76         $choices{$vote->choice_info($_)->{key}} = $vote->choice_info($_)->{label}; 
     75    foreach ($poll->choices_keys) { 
     76        $choices{$_} = $poll->choice($_)->info->{label}; 
    7777    } 
    7878    $c->stash->{choices} = { %choices }; 
     
    111111 
    112112    if ($c->req->param('confirm')) { 
    113         $c->stash->{ballotid} = $vote->register_ballot( 
     113        $c->stash->{ballotid} = $poll->register_ballot( 
    114114            $mail, 
    115             $id, 
    116115            [ @sbalval ], 
    117116            [ @{ $c->stash->{fsbal} } ], 
  • trunk/lib/Vote/Controller/Vote.pm

    r206 r207  
    3838 
    3939    $c->stash->{voteid} = $id; 
    40     $c->stash->{page}{title} = 'Vote: ' . $c->model('Vote')->poll($id).info('label'); 
     40    $c->stash->{page}{title} = 'Vote: ' . $c->model('Vote')->poll($id)->info('label'); 
    4141} 
    4242 
  • trunk/lib/Vote/DB.pm

    r206 r207  
    88use Vote::DB::Poll; 
    99use Vote::DB::Poll::Results; 
    10 use Vote::DB::Ballot; # see ballot() 
    11 use Vote::DB::Voting; # see delete_voting() 
    12 use Vote::DB::Choice; 
    1310 
    1411our $VERSION = '1.90'; 
     
    10097} 
    10198 
    102 # TODO 
    103 sub ballot { 
    104     my ($self, $ballotid) = @_; 
    105     die "# ballot" . join(' ',caller()); 
    106     # TODO must die, ballot are attached to a poll 
    107     Vote::DB::Ballot->new($self->{dbstring}, $ballotid); 
    108 } 
    109  
    110 # TODO 
    111 sub vote_param { 
    112     my ($self, $voteid, %attr) = @_; 
    113     die "# vote_param" . join(' ',caller()); 
    114     $self->poll($voteid)->param(%attr); 
    115 } 
    116  
    117 # TODO kill this 
    118 sub vote_status { 
    119     my ($self, $id) = @_; 
    120     die "# vote_status" . join(' ',caller()); 
    121     $self->poll($id)->status; 
    122 } 
    123  
    124 # TODO 
    125 sub vote_info { 
    126     my ($self, $id) = @_; 
    127     die "# vote_info" . join(' ',caller()); 
    128     $self->poll($id)->info; 
    129 } 
    130  
    131 sub vote_set_settings { 
    132     my ($self, $poll, $var, $val) = @_; 
    133     $self->poll($poll)->set_settings($var, $val); 
    134 } 
    135  
    136 sub vote_signing { 
    137     my ($self, $id) = @_; 
    138     $self->poll($id)->signing; 
    139 } 
    140  
    141 sub vote_voting { 
    142     my ($self, $voteid) = @_; 
    143     $self->poll($voteid)->voting_keys; 
    144 } 
    145  
    146 sub voting_info { 
    147     my ($self, $id) = @_; 
    148     $self->poll($id)->voting_info; 
    149 } 
    150  
    151 sub vote_choices { 
    152     my ($self, $id) = @_; 
    153     $self->poll($id)->choices; 
    154 } 
    155  
    156 sub vote_add_choice { 
    157     my ($self, $voteid, $label) = @_; 
    158     $self->poll($voteid)->add_choice($label); 
    159 } 
    160  
    161 sub choice_info { 
    162     my ($self, $chid) = @_; 
    163     Vote::DB::Choice->new($self->{dbstring}, $chid)->info; 
    164 } 
    165  
    166 sub delete_choice { 
    167     my ($self, $chid) = @_; 
    168  
    169     my $sth = $self->db->prepare_cached( 
    170         q{delete from choice where key = ?} 
    171     ); 
    172  
    173     $sth->execute($chid); 
    174 } 
    175  
    176 sub voting_info_id { 
    177     my ($self, $mail, $voteid) = @_; 
    178     $self->poll($voteid)->voting_from_mail($mail)->info; 
    179 } 
    180  
    181 sub register_ballot { 
    182     my ($self, $vid, $voteid, $choice, $fchoice, $referal) = @_; 
    183     $self->poll($voteid)->register_ballot($vid, $choice, $fchoice, $referal); 
    184 } 
    185  
    186 sub vote_voting_count { 
    187     my ($self, $id) = @_; 
    188     $self->poll($id)->voting_count; 
    189 } 
    190  
     99# This part is keep to track error 
     100sub ballot {die "# ballot" . join(' ',caller());} 
     101sub vote_param { die "# vote_param" . join(' ',caller());} 
     102sub vote_status {die "# vote_status" . join(' ',caller());} 
     103sub vote_info {die "# vote_info" . join(' ',caller());} 
     104sub vote_set_settings {die "# old functions" . join(' ',caller());} 
     105sub vote_signing {die "# old functions" . join(' ',caller());} 
     106sub vote_voting {die "# old functions" . join(' ',caller());} 
     107sub voting_info {die "# old functions" . join(' ',caller());} 
     108sub vote_choices {die "# old functions" . join(' ',caller());} 
     109sub vote_add_choice {die "# old functions" . join(' ',caller());} 
     110sub choice_info {die "# old functions" . join(' ',caller());} 
     111sub delete_choice {die "# old functions" . join(' ',caller());} 
     112sub voting_info_id {die "# old functions" . join(' ',caller());} 
     113sub register_ballot {die "# old functions" . join(' ',caller());} 
     114sub vote_voting_count {die "# old functions" . join(' ',caller());} 
    191115sub signing_count { vote_signing_count(@_) } 
    192  
    193 sub vote_signing_count { 
    194     my ($self, $voteid) = @_; 
    195     $self->poll($voteid)->signing_count; 
    196 } 
    197  
     116sub vote_signing_count {die "# old functions" . join(' ',caller());} 
    198117sub ballot_count { vote_ballot_count(@_) } 
    199  
    200 sub vote_ballot_count { 
    201     my ($self, $voteid) = @_; 
    202     $self->poll($voteid)->ballot_count; 
    203 } 
    204  
     118sub vote_ballot_count {die "# old functions" . join(' ',caller());} 
    205119sub ballot_count_nonull { vote_ballot_count_nonull(@_) } 
    206  
    207 sub vote_ballot_count_nonull { 
    208     my ($self, $voteid) = @_; 
    209     $self->results($voteid)->ballot_count_nonull; 
    210 } 
    211  
    212 sub auth_voting { 
    213     my ($self, $poll, $mail, $password) = @_; 
    214     $self->poll($poll)->auth_voting($mail, $password); 
    215 } 
    216  
    217 sub auth_poll { 
    218     my ($self, $voteid, $passwd) = @_; 
    219     $self->poll($voteid)->auth_poll($passwd); 
    220 } 
    221  
    222 sub voting_has_sign { 
    223     my ($self, $poll, $user) = @_; 
    224     $self->poll($poll)->voting_has_sign($user); 
    225 } 
    226  
    227 # Requete de decompte des voix: 
    228  
    229 sub vote_results_count { 
    230     my ($self, $voteid) = @_; 
    231     $self->results($voteid)->results_count; 
    232 } 
    233  
    234 sub vote_results_nonull { 
    235     my ($self, $voteid) = @_; 
    236     $self->results($voteid)->results_nonull; 
    237 } 
    238  
    239 sub list_vote_ballot { 
    240     my ($self, $voteid) = @_; 
    241     $self->poll($voteid)->list_ballot; 
    242 } 
    243  
    244 sub list_vote_ballot_needvalid { 
    245     my ($self, $voteid) = @_; 
    246     $self->poll($voteid)->list_ballot_needvalid; 
    247 } 
    248  
    249 sub ballot_info { 
    250     my ($self, $ballotid) = @_; 
    251     $self->ballot($ballotid)->info; 
    252 } 
    253  
    254 sub mark_ballot_invalid { 
    255     my ($self, $ballotid, $invalid) = @_; 
    256     $self->ballot($ballotid)->mark_invalid($invalid); 
    257 } 
    258  
    259 sub ballot_items { 
    260     my ($self, $ballotid) = @_; 
    261     $self->ballot($ballotid)->items; 
    262 } 
    263  
    264 sub vote_ballot_untrusted_values { 
    265     my ($self, $voteid) = @_; 
    266     $self->poll($voteid)->ballot_untrusted_values; 
    267 } 
    268  
    269 sub vote_ballot_values { 
    270     my ($self, $voteid) = @_; 
    271     $self->poll($voteid)->ballot_values; 
    272 } 
    273  
    274 sub vote_map_value { 
    275     my ($self, $voteid, $from, $to) = @_; 
    276     $self->poll($voteid)->map_value($from, $to); 
    277 } 
    278  
    279 sub addupd_voting { 
    280     my ($self, $voteid, $mail, $id) = @_; 
    281     $self->poll($voteid)->addupd_voting($mail, $id); 
    282 } 
    283  
    284 sub delete_voting { 
    285     my ($self, $key) = @_; 
    286     # must die, voting are attached to a poll 
    287     Vote::DB::Voting->new($self->{dbstring}, $key)->has_sign and return; 
    288     my $sth = $self->db->prepare_cached( 
    289         q{delete from voting where key = ?} 
    290     ); 
    291  
    292     $sth->execute($key); 
    293 } 
    294  
    295 sub voting_from_file { 
    296     my ($self, $voteid, $fh, $delete) = @_; 
    297     $self->poll($voteid)->voting_from_file($fh, $delete); 
    298 } 
     120sub vote_ballot_count_nonull {die "# old functions" . join(' ',caller());} 
     121sub auth_voting {die "# old functions" . join(' ',caller());} 
     122sub auth_poll {die "# old functions" . join(' ',caller());} 
     123sub voting_has_sign {die "# old functions" . join(' ',caller());} 
     124sub vote_results_count {die "# old functions" . join(' ',caller());} 
     125sub vote_results_nonull {die "# old functions" . join(' ',caller());} 
     126sub list_vote_ballot {die "# old functions" . join(' ',caller());} 
     127sub list_vote_ballot_needvalid {die "# old functions" . join(' ',caller());} 
     128sub ballot_info {die "# vote_status" . join(' ',caller());} 
     129sub mark_ballot_invalid {die "# old functions" . join(' ',caller());} 
     130sub ballot_items {die "# old functions" . join(' ',caller());} 
     131sub vote_ballot_untrusted_values {die "# old functions" . join(' ',caller());} 
     132sub vote_ballot_values {die "# old functions" . join(' ',caller());} 
     133sub vote_map_value {die "# old functions" . join(' ',caller());} 
     134sub addupd_voting {die "# old functions" . join(' ',caller());} 
     135sub delete_voting {die "# old functions" . join(' ',caller());} 
     136sub voting_from_file {die "# old functions" . join(' ',caller());} 
    299137 
    300138sub clean_old_poll_request { 
    301139    my ($self) = @_; 
    302  
    303140    $self->db->do(q{delete from poll_request where "create" < now() - '30 days'::interval}); 
    304141} 
  • trunk/lib/Vote/DB/Poll.pm

    r206 r207  
    2929    my ($class, $dbstring, $voteid) = @_; 
    3030     
     31    $voteid or return; 
     32 
    3133    bless { 
    3234        voteid => $voteid, 
     
    135137    if ($var) { 
    136138        if (grep { $var eq $_ } (_online_f(), qw(dstart hstart dend hend))) { 
    137             return $self->_info->{$var}; 
     139            return ( $self->_info || {} )->{$var}; 
    138140        } else { 
    139141            my $sth = $self->db->prepare_cached( 
     
    276278} 
    277279 
     280sub choices_keys { 
     281    my ($self) = @_; 
     282 
     283    my $sth = $self->db->prepare_cached( 
     284        q{ 
     285        select key from choice where poll = ? 
     286        order by label 
     287        } 
     288    ); 
     289    $sth->execute($self->voteid); 
     290    my @ch; 
     291    while (my $res = $sth->fetchrow_hashref) { 
     292        push(@ch, $res->{key}); 
     293    } 
     294    @ch 
     295} 
     296 
     297# TODO: replaced, to kill 
    278298sub choices { 
    279299    my ($self) = @_; 
     
    636656} 
    637657 
     658# TODO kill this: 
    638659sub list_ballot { 
     660    ballot_keys(@_); 
     661} 
     662 
     663sub ballot_keys { 
    639664    my ($self) = @_; 
    640665 
     
    796821    } 
    797822    1; 
     823} 
     824 
     825sub delete_voting { 
     826    my ($self, $key) = @_; 
     827    $self->voting($key)->has_sign and return; 
     828    my $sth = $self->db->prepare_cached( 
     829        q{delete from voting where key = ? and poll = ?} 
     830    ); 
     831 
     832    $sth->execute($key, $self->voteid); 
    798833} 
    799834 
  • trunk/root/latex/poll_report.tt

    r193 r207  
    9494\subsection{Liste des bulletins} 
    9595 
    96 [% FOREACH id = poll.list_ballot %] 
    97 [% invalid = '#' _ vote.ballot_info(id).invalid %] 
     96[% FOREACH id = poll.ballot_keys %] 
     97[%- ballot = poll.ballot(id) -%] 
     98[% invalid = '#' _ ballot.info.invalid %] 
    9899[% IF loop.first %] 
    99100\begin{enumerate} 
     
    101102\item \verb+[% id %]+ [% "\textbf{invalidé}" IF invalid == '#1' %]  
    102103 
    103 [%- ballot = poll.ballot(id) -%] 
    104104[%- FOREACH item = ballot.items -%] 
    105105[% '\begin{enumerate}' IF loop.first %] 
  • trunk/root/templates/admin/ballot.tt

    r169 r207  
    33[% vote = c.model('Vote') %] 
    44[% poll = c.model('Vote').poll(voteid) %] 
    5 [% thisvote = poll.info %] 
    65 
    76<div style="float: left; width: 35%" class="box"> 
    87<form action="[% c.uri_for(voteid, 'ballot') %]"> 
    98Nombre de choix possible: 
    10 <input type="text" name="choice_count" value="[% c.req.param('choice_count') || thisvote.choice_count | html %]"> 
     9<input type="text" name="choice_count" value="[% c.req.param('choice_count') || poll.info('choice_count') | html %]"> 
    1110<br> 
    1211Nombre de choix libres: 
    13 <input type="text" name="free_choice" value="[% c.req.param('free_choice') || thisvote.free_choice || 0 | html %]"> 
     12<input type="text" name="free_choice" value="[% c.req.param('free_choice') || poll.info('free_choice') || 0 | html %]"> 
    1413<br> 
    1514<input type="submit" name="pollparam" value="Enregistrer"> 
     
    1817<hr> 
    1918 
    20 [% IF ! vote.vote_choices(voteid).size %] 
     19[% IF ! poll.choices_keys.size %] 
    2120<p class="alert">Aucun choix configuré</p> 
    2221[% ELSE %] 
    23 [% FOREACH choice = vote.vote_choices(voteid) %] 
     22[% FOREACH choicek = poll.choices_keys %] 
     23[% choice = poll.choice(choicek) %] 
    2424<form action="[% c.uri_for(voteid, 'ballot') %]" method="POST"> 
    25 [% loop.count %] - [% vote.choice_info(choice).label | html %] 
    26 <input type="hidden" name="delch" value="[% vote.choice_info(choice).key %]"> 
     25[% loop.count %] - [% choice.info.label | html %] 
     26<input type="hidden" name="delch" value="[% choicek %]"> 
    2727<input type="submit" name="del" value="Effacer"> 
    2828</form> 
  • trunk/root/templates/admin/includes/ballot_validation.tt

    r176 r207  
    33 
    44[% IF poll.status == 'AFTER' %] 
    5 [% FOREACH untrusted = vote.vote_ballot_untrusted_values(voteid) %] 
     5[% FOREACH untrusted = poll.ballot_untrusted_values %] 
    66[% IF loop.first %] 
    77<div id="map_ballot"> 
     
    1616    <input type="hidden" name="mapfrom" value="[% untrusted | html %]"> 
    1717    <select name="mapto"> 
    18     [% FOREACH v = vote.vote_ballot_values(voteid) %] 
     18    [% FOREACH v = poll.ballot_values %] 
    1919        [% NEXT IF v == untrusted %] 
    2020        <option>[% v | html %]</options> 
     
    3131[% END %] 
    3232 
    33 [% FOREACH bid = vote.list_vote_ballot_needvalid(voteid) %] 
     33[% FOREACH bid = poll.list_ballot_needvalid(voteid) %] 
    3434    [% IF loop.first %] 
    3535    <div id="ballot_to_valid"> 
     
    4141<td>[% bid %]</td> 
    4242<td> 
    43 [% FOREACH item = vote.ballot_items(bid) %] 
     43[% FOREACH item = poll.ballot(bid).items %] 
    4444[% loop.count %]- [% item.v %]<br> 
    4545[% END %] 
  • trunk/root/templates/admin/index.tt

    r206 r207  
    11[% vote = c.model('Vote') %] 
    2 [% poll = c.model('Vote').poll('voteid') %] 
     2[% poll = c.model('Vote').poll(voteid) %] 
    33 
    44[% 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> 
     5<a href="[% c.uri_for('/admin', voteid) %]">[% poll.info('label') | html %]</a> 
    66<br> 
    77[% END %] 
  • trunk/root/templates/admin/voting.tt

    r205 r207  
    3333<div class="box" style="float: right; width: 60%;"> 
    3434 
    35 [% IF NOT vote.vote_voting_count(voteid) %] 
     35[% IF NOT poll.voting_count %] 
    3636<p class="alert">Aucun votant inscrit</p> 
    3737[% ELSE %] 
    3838 
    39 [% signing = vote.vote_voting(voteid) %] 
    40  
    41 [% FOREACH thisvoting = signing %] 
     39[% FOREACH votingkey = poll.voting_keys %] 
     40[% voting = poll.voting(votingkey) %] 
    4241 
    4342[% IF loop.first %] 
     
    4544[% END %] 
    4645 
    47 [% voting = vote.voting_info(thisvoting) %] 
    4846<tr> 
    4947 
    50 [% IF NOT voting.date %] 
     48[% IF NOT voting.info.date %] 
    5149[% IF poll.status != 'AFTER' %] 
    5250<form action="[% c.uri_for(voteid, 'voting') %]" method="POST"> 
    53 <input type="hidden" name="delvoting" value="[% voting.vkey %]"> 
     51<input type="hidden" name="delvoting" value="[% voting.votingkey %]"> 
    5452[% END %] 
    5553[% END %] 
    5654 
    57 <td>[% voting.label | html %] [% voting.mail | html %]</td> 
    58 <td>[% IF voting.passwd %]<i>(pass envoyé)</i>[% END %]</td> 
     55<td>[% voting.label | html %] [% voting.info.mail | html %]</td> 
     56<td>[% IF voting.info.passwd %]<i>(pass envoyé)</i>[% END %]</td> 
    5957 
    60 [% IF NOT voting.date %] 
     58[% IF NOT voting.info.date %] 
    6159<td> 
    6260[% IF poll.status != 'AFTER' %] 
     
    6664</form> 
    6765[% ELSE %] 
    68 <td>[% voting.date %]</td> 
     66<td>[% voting.info.date %]</td> 
    6967[% END %] 
    7068 
  • trunk/root/templates/default.tt

    r206 r207  
    4747[% END %] 
    4848<tr> 
    49 <td><lu><li><a href="[% c.uri_for( 'vote', id ) %]">[% c.model('Vote').poll(id).info('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> 
    5050</tr> 
    5151[% IF loop.last %] 
  • trunk/root/templates/includes/ballot_form.tt

    r169 r207  
    11[% poll = c.model('Vote').poll(voteid) %] 
    2 [% thisvote = poll.info() %] 
    32 
    43<!-- $Id$ --> 
     
    109 
    1110[% count = 0 %] 
    12 [% WHILE count < thisvote.free_choice %] 
     11[% WHILE count < poll.info('free_choice') %] 
    1312<input type="text" name="fsbal" value="[% fsbal.$count %]"><br> 
    1413[% count = count + 1 %] 
  • trunk/root/templates/includes/poll_results.tt

    r206 r207  
    11[% vote = c.model('Vote') %] 
    2 [% poll = c.model('Vote').poll(voteid) %] 
     2[% poll = c.model('Vote').results(voteid) %] 
    33 
    44[% IF poll.can_show_result %] 
     
    88<a href="[% c.uri_for('/vote', voteid, 'report.pdf') %]">Rapport en PDF</a> 
    99</div> 
    10 [% IF vote.list_vote_ballot_needvalid(voteid).size %] 
     10[% IF poll.list_ballot_needvalid.size %] 
    1111<p>Resultats provisoires:</p> 
    1212<p class="alert">Le gestionnaire doit vérifier la validité de certains bulletins</p> 
     
    1515[% END %] 
    1616<p>Nombre de choix à retenir: [% poll.info('choice_count') %]</p> 
    17 <p>Participations: [% vote.vote_signing_count(voteid) %] / [% vote.vote_voting_count(voteid) %] 
    18 [% IF vote.vote_voting_count(voteid) %] 
    19 ([% vote.vote_signing_count(voteid) * 100 / vote.vote_voting_count(voteid) | format('%.2f') %]) 
     17<p>Participations: [% poll.signing_count %] / [% poll.voting_count %] 
     18[% IF poll.voting_count %] 
     19([% poll.signing_count * 100 / poll.voting_count(voteid) | format('%.2f') %]) 
    2020[% END %]</p> 
    21 <p>Nombre de vote(s) exprimé(s): [% vote.vote_ballot_count_nonull(voteid) %] 
    22 [% IF vote.vote_ballot_count(voteid) %] 
    23 ([% vote.vote_ballot_count_nonull(voteid) * 100 / vote.vote_ballot_count(voteid) | format('%.2f') %]%) 
     21<p>Nombre de vote(s) exprimé(s): [% poll.ballot_count_nonull %] 
     22[% IF poll.ballot_count(voteid) %] 
     23([% poll.ballot_count_nonull * 100 / poll.ballot_count | format('%.2f') %]%) 
    2424[% END %] 
    2525</p> 
    2626 
    27 [% IF vote.vote_ballot_count_nonull(voteid) %] 
    28 [% FOREACH res = vote.vote_results_nonull(voteid) %] 
     27[% IF poll.ballot_count_nonull %] 
     28[% FOREACH res = poll.results_nonull %] 
    2929[% IF loop.first %] 
    3030<p>Score:</p> 
     
    4343[% mycount = loop.count %] 
    4444[% IF loop.count <= poll.info('choice_count') %] 
    45 [% IF res.count >= vote.absolute_majority %] 
     45[% IF res.count >= poll.absolute_majority %] 
    4646[% class = 'majabs' %] 
    4747[% ELSE %] 
     
    5757<td>[% res.value | html %]</td> 
    5858<td>[% res.count %]</td> 
    59 <td>[% res.count * 100 / vote.ballot_count_nonull(voteid) | format('%.2f') %]</td> 
     59<td>[% res.count * 100 / poll.ballot_count_nonull | format('%.2f') %]</td> 
    6060<td><img src="[% c.uri_for('/static', 'images', 'green-v.png') %]"  
    61 height="10px" width="[% res.count * 400 / vote.ballot_count_nonull(voteid) | format('%d') %]px"></td> 
     61height="10px" width="[% res.count * 400 / poll.ballot_count_nonull(voteid) | format('%d') %]px"></td> 
    6262</tr> 
    6363 
     
    7171</div> 
    7272 
    73 [% FOREACH id = vote.list_vote_ballot(voteid) %] 
     73[% FOREACH id = poll.ballot_keys %] 
    7474[% IF loop.first %] 
    7575<div id="ballot_list" class="box"> 
     
    8787<td>[% id | html %]</td> 
    8888<td> 
    89 [% items = vote.ballot_items(id) %] 
     89[% items = poll.ballot(id).items %] 
    9090[% IF items.size %] 
    9191[% FOREACH item = items %] 
     
    101101</td> 
    102102<td> 
    103 [% invalid = '#' _ vote.ballot_info(id).invalid %] 
     103[% invalid = '#' _ poll.ballot(id).info.invalid %] 
    104104[% IF invalid == '#1' %] 
    105105<span class="alert">Invalidé</span> 
Note: See TracChangeset for help on using the changeset viewer.