Adding basis of nl manager.

This commit is contained in:
Martin Kamerbeek 2010-04-22 16:20:03 +02:00
parent 0fa97d2d9d
commit af40a772a9
4 changed files with 98 additions and 21 deletions

View file

@ -24,25 +24,25 @@ sub canUnsubscribe {
return !$self->session->user->isVisitor && $self->isSubscribed;
}
#----------------------------------------------------------------------------
sub configureMailingForm {
my $self = shift;
my $f = $self->next::method;
tie my %issues, 'Tie::IxHash', (
'' => 'Choose issue...',
map { $_->getId => $_->getTitle }
@{ $self->getIssues }
);
$f->selectBox(
name => $issue,
label => 'Issue',
options => $self->getIssues
);
return $f;
}
##----------------------------------------------------------------------------
#sub configureMailingForm {
# my $self = shift;
# my $f = $self->next::method;
#
# tie my %issues, 'Tie::IxHash', (
# '' => 'Choose issue...',
# map { $_->getId => $_->getTitle }
# @{ $self->getIssues }
# );
#
# $f->selectBox(
# name => 'issue',
# label => 'Issue',
# options => $self->getIssues
# );
#
# return $f;
#}
#----------------------------------------------------------------------------
sub definition {
@ -80,8 +80,9 @@ sub getIssues {
#----------------------------------------------------------------------------
sub getRecipients {
my $self = shift;
my $self = shift;
my $db = $self->session->db;
my @subscribers = $db->buildArray( 'select userId from NewsletterCollection_subscriptions where assetId=?', [
$self->getId,
] );