Refactored tmpl_var generation for mailing admin a bit so that they are created in sane places.

This commit is contained in:
Martin Kamerbeek 2010-06-02 12:07:24 +02:00
parent 646112da91
commit 03410dd343
2 changed files with 30 additions and 22 deletions

View file

@ -165,6 +165,27 @@ sub getStatusLine {
return $output;
}
#----------------------------------------------------------------------------
sub getViewVars {
my $self = shift;
my $url = $self->session->url;
my $state = $self->get('state');
my $baseParams = sprintf 'newsletter=mailing;id=%s', $self->getId;
return {
%{ $self->get },
status => $self->getStatusLine,
"is$state" => 1,
sendTestUrl => $url->page("$baseParams;func=sendTestEmails" ),
sendUrl => $url->page("$baseParams;func=sendBatch" ),
editUrl => $url->page("$baseParams;func=edit" ),
deleteUrl => $url->page("$baseParams;func=delete" ),
previewUrl => $url->page("$baseParams;func=previewEmail" ),
cancelUrl => $url->page("$baseParams;func=cancel" ),
};
}
#----------------------------------------------------------------------------
sub queueTestEmails {
my $self = shift;