Changeset 183
- Timestamp:
- 04/12/09 18:33:25 (15 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Changes
r180 r183 5 5 - preserve line break in ballot page 6 6 - group value per ballot 7 - generate a pdf output using Latex 7 8 8 9 1.00 2009-04-03 16:00 -
trunk/MANIFEST
r182 r183 32 32 lib/Vote/View/Mail.pm 33 33 lib/Vote/View/TT.pm 34 lib/Vote/View/Latex.pm 34 35 Makefile.PL 35 36 MANIFEST This list of files … … 59 60 root/mail/ballot_confirm.tt 60 61 root/mail/voting_passwd.tt 62 root/latex/includes/header.tt 63 root/latex/includes/footer.tt 64 root/latex/poll_report.tt 61 65 root/templates/admin/default.tt 62 66 root/templates/admin/denied.tt -
trunk/lib/Vote/Controller/Admin.pm
r182 r183 214 214 } 215 215 216 sub dec: LocalRegex('^(\d+)/dec$') {217 my ($self, $c, $id, @sub) = @_;218 ($c->stash->{voteid}) = @{ $c->req->snippets || [] };219 my $vote = $c->model('Vote');220 221 $vote->vote_info($id) or do {222 $c->res->redirect($c->uri_for('/'));223 return;224 };225 226 $c->forward('auth') or return;227 $c->stash->{page}{title} = $c->model('Vote')->vote_info(228 $c->stash->{voteid}229 )->{label} . ': Administration, bulletin';230 $c->model('Vote')->poll($c->stash->{voteid})->decrypted_ballots;231 }232 233 216 sub end : Private { 234 217 my ($self, $c) = @_; 235 218 if ($c->res->body) { return } 219 elsif ($c->stash->{latex}) { $c->forward(qw/Vote::View::Latex/) } 236 220 else { $c->forward(qw/Vote::View::TT/) } 237 221 } -
trunk/lib/Vote/Controller/Vote.pm
r180 r183 40 40 } 41 41 42 sub report: LocalRegex('^(\d+)/report.(\w+)$') { 43 my ($self, $c, $id, @sub) = @_; 44 ($c->stash->{voteid}, $c->stash->{format}) = @{ $c->req->snippets || [] }; 45 my $vote = $c->model('Vote'); 46 47 $vote->vote_info($id) or do { 48 $c->res->redirect($c->uri_for('/')); 49 return; 50 }; 51 52 $c->stash->{template} = 'poll_report.tt'; 53 $c->stash->{latex} = 1; 54 } 55 42 56 sub end : Private { 43 57 my ($self, $c) = @_; 44 58 if ($c->res->body) { return } 59 elsif ($c->stash->{latex}) { $c->forward(qw/Vote::View::Latex/) } 45 60 else { $c->forward(qw/Vote::View::TT/) } 46 61 } -
trunk/root/templates/includes/poll_results.tt
r176 r183 5 5 6 6 <div id="results" class="box"> 7 <div style="float: right"> 8 <a href="[% c.uri_for('/vote', voteid, 'report.pdf') %]">Rapport en PDF</a> 9 </div> 7 10 [% IF vote.list_vote_ballot_needvalid(voteid).size %] 8 11 <p>Resultats provisoires:</p>
Note: See TracChangeset
for help on using the changeset viewer.