Changeset 75
- Timestamp:
- 03/18/09 17:33:20 (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Vote/Controller/Admin.pm
r74 r75 56 56 $c->stash->{page}{title} = $c->model('Vote')->vote_info($id)->{label} . ': Administration'; 57 57 58 if ($vote->vote_status($id) eq 'BEFORE') { 59 if (my ($upload) = $c->req->upload('votinglist')) { 60 $vote->voting_from_file( 61 $id, 62 $upload->fh, 63 $c->req->param('delete'), 64 ) and $vote->db->commit; 65 } elsif ($c->req->param('addch')) { 58 warn $vote->vote_status($id); 59 for ($vote->vote_status($id) || '') { 60 /^BEFORE$/ and do { 61 if ($c->req->param('addch')) { 66 62 $vote->vote_add_choice($id, $c->req->param('addch')) 67 63 and $vote->db->commit; … … 85 81 qw(label description start end choice_count free_choice) 86 82 ) and $vote->db->commit; 83 } 84 }; 85 86 /^(BEFORE|RUNNING)$/ and do { 87 warn "XX"; 88 if (my ($upload) = $c->req->upload('votinglist')) { 89 $vote->voting_from_file( 90 $id, 91 $upload->fh, 92 $c->req->param('delete'), 93 ) and $vote->db->commit; 87 94 } elsif($c->req->param('delvoting')) { 88 95 $vote->delete_voting($c->req->param('delvoting')) … … 96 103 }); 97 104 } 98 } elsif ($vote->vote_status($id) eq 'AFTER') { 105 }; 106 107 /^AFTER$/ and do { 99 108 if ($c->req->param('mapfrom') && $c->req->param('mapto')) { 100 109 $vote->vote_map_value( … … 115 124 } 116 125 } 117 } else { 118 # can't modify vote after date 119 $c->stash->{template} = 'admin/denied.tt'; 120 return; 126 }; 121 127 } 122 128 -
trunk/root/templates/admin/default.tt
r73 r75 66 66 </tr> 67 67 </table> 68 68 [% ELSE %] 69 [% INCLUDE 'includes/poll.tt' %] 70 [% END %] 69 71 <hr> 70 72 73 [% IF vote.vote_status(voteid) != 'AFTER' %] 71 74 Liste des votants : 72 75 <table border="1">
Note: See TracChangeset
for help on using the changeset viewer.