Changeset 180
- Timestamp:
- 04/11/09 02:10:50 (15 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Changes
r154 r180 1 1 This file documents the revision history for Perl extension Vote. 2 3 2.00 4 - allow to encrypt ballot 5 - preserve line break in ballot page 6 - group value per ballot 2 7 3 8 1.00 2009-04-03 16:00 -
trunk/MANIFEST
r176 r180 30 30 lib/Vote/Model/Vote.pm 31 31 lib/Vote/Template/Plugin/Mail.pm 32 lib/Vote/View/Mail.pm 32 33 lib/Vote/View/TT.pm 33 34 Makefile.PL … … 55 56 root/static/js/CalendarPopup.js 56 57 root/static/vote.css 58 root/mail/poll_request.tt 57 59 root/templates/admin/default.tt 58 60 root/templates/admin/denied.tt … … 97 99 t/controller_Vote.t 98 100 t/model_Vote.t 101 t/view_Mail.t 99 102 t/view_TT.t 100 103 epoll.yml.example -
trunk/lib/Vote/Controller/Ballot.pm
r128 r180 126 126 } 127 127 128 sub end : Private { 129 my ($self, $c) = @_; 130 if ($c->res->body) { return } 131 else { $c->forward(qw/Vote::View::TT/) } 132 } 133 128 134 =head1 AUTHOR 129 135 -
trunk/lib/Vote/Controller/Newpoll.pm
r174 r180 33 33 $c->stash->{page}{title} = 'Créer un nouveau vote'; 34 34 if ($c->req->param('mail')) { 35 $c->model('Vote')->create_poll_request(35 my $reqid = $c->model('Vote')->create_poll_request( 36 36 mail => $c->req->param('mail'), 37 url => $c->uri_for('/newpoll'),38 37 label => $c->req->param('label'), 39 38 ); 39 $c->forward( 40 q'Vote::View::Mail', 'render', 41 [ 'poll_request.tt', { 42 To => $c->req->param('mail'), 43 Subject => "New poll request", 44 mail => { 45 label => $c->req->param('label'), 46 reqid => $reqid, 47 } 48 } ]); 49 40 50 $c->stash->{template} = 'newpoll/request.tt'; 41 51 } … … 62 72 } 63 73 74 sub end : Private { 75 my ($self, $c) = @_; 76 if ($c->res->body) { return } 77 else { $c->forward(qw/Vote::View::TT/) } 78 } 79 64 80 =head1 AUTHOR 65 81 -
trunk/lib/Vote/Controller/Root.pm
r128 r180 44 44 =cut 45 45 46 sub end : ActionClass('RenderView') {} 46 sub end : Private { 47 my ($self, $c) = @_; 48 if ($c->res->body) { return } 49 else { $c->forward(qw/Vote::View::TT/) } 50 } 47 51 48 52 =head1 AUTHOR -
trunk/lib/Vote/Controller/Vote.pm
r128 r180 40 40 } 41 41 42 sub end : Private { 43 my ($self, $c) = @_; 44 if ($c->res->body) { return } 45 else { $c->forward(qw/Vote::View::TT/) } 46 } 47 42 48 =head1 AUTHOR 43 49 -
trunk/lib/Vote/DB.pm
r175 r180 360 360 361 361 $addreq->execute($reqid, $info{label}, $info{mail}); 362 my $mailer = new Mail::Mailer 'smtp', Server => (Vote->config->{smtp} || 'localhost');363 $ENV{MAILADDRESS} = undef;364 $mailer->open({365 From => 'Voting system <nomail@nomail.com>', # TODO allow to configure this366 To => $info{mail},367 Subject => 'Votre nouveau vote',368 Vote::DB::common::mail_header(),369 });370 print $mailer <<EOF;371 372 Vous avez demandez la création d'un nouveau vote:373 $info{label}374 375 Pour valider votre demande, veuiller allez visitez la page:376 $info{url}/$reqid377 378 A bientÎt379 EOF380 $mailer->close381 or warn "couldn't send whole message: $!\n";382 362 $self->db->commit; 383 1;363 $reqid; 384 364 } 385 365
Note: See TracChangeset
for help on using the changeset viewer.