move admin console links into asset helpers
This commit is contained in:
parent
aee00bfad1
commit
fbd573c9d6
1 changed files with 32 additions and 22 deletions
|
|
@ -277,7 +277,9 @@ a shelf. Override master class to add different form.
|
||||||
|
|
||||||
sub getAddToCartForm {
|
sub getAddToCartForm {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $session = $self->session;
|
:cn
|
||||||
|
:cn
|
||||||
|
|
||||||
my $i18n = WebGUI::International->new($session, 'Asset_Subscription');
|
my $i18n = WebGUI::International->new($session, 'Asset_Subscription');
|
||||||
return
|
return
|
||||||
WebGUI::Form::formHeader($session, {action => $self->getUrl})
|
WebGUI::Form::formHeader($session, {action => $self->getUrl})
|
||||||
|
|
@ -289,27 +291,6 @@ sub getAddToCartForm {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 getAdminConsoleWithSubmenu ( )
|
|
||||||
|
|
||||||
Returns an admin console with management links added to the submenu.
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
sub getAdminConsoleWithSubmenu {
|
|
||||||
my $self = shift;
|
|
||||||
my $session = $self->session;
|
|
||||||
my $ac = $self->getAdminConsole;
|
|
||||||
my $i18n = WebGUI::International->new( $session, 'Asset_Subscription' );
|
|
||||||
|
|
||||||
$ac->addSubmenuItem( $self->getUrl('func=createSubscriptionCodeBatch'), $i18n->get('generate batch'));
|
|
||||||
$ac->addSubmenuItem( $self->getUrl('func=listSubscriptionCodes;selection=dc'), $i18n->get('manage codes') );
|
|
||||||
$ac->addSubmenuItem( $self->getUrl('func=listSubscriptionCodeBatches'), $i18n->get('manage batches'));
|
|
||||||
|
|
||||||
return $ac;
|
|
||||||
}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
|
|
||||||
=head2 getCode ( code )
|
=head2 getCode ( code )
|
||||||
|
|
||||||
Returns a hashref with the properties of the passed code.
|
Returns a hashref with the properties of the passed code.
|
||||||
|
|
@ -415,6 +396,35 @@ sub getExpirationOffset {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 getHelpers ( )
|
||||||
|
|
||||||
|
Get the some links to manage subscription codes
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
override getHelpers => sub {
|
||||||
|
my ( $self ) = @_;
|
||||||
|
my $helpers = super();
|
||||||
|
my $i18n = WebGUI::International->new( $session, 'Asset_Subscription' );
|
||||||
|
|
||||||
|
$helpers->{createSubscriptionCodeBatch} = {
|
||||||
|
url => $self->getUrl('func=createSubscriptionCodeBatch'),
|
||||||
|
label => $i18n->get('generate batch'),
|
||||||
|
};
|
||||||
|
$helpers->{listSubscriptionCodes} = {
|
||||||
|
url => $self->getUrl('func=listSubscriptionCodes;selection=dc'),
|
||||||
|
label => $i18n->get('manage codes'),
|
||||||
|
};
|
||||||
|
$helpers->{listSubscriptionCodeBatches} = {
|
||||||
|
url => $self->getUrl('func=listSubscriptionCodeBatches'),
|
||||||
|
label => $i18n->get('manage batches'),
|
||||||
|
};
|
||||||
|
|
||||||
|
return $helpers;
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 getPrice
|
=head2 getPrice
|
||||||
|
|
||||||
Returns configured price, 0.00 if neither of those are available.
|
Returns configured price, 0.00 if neither of those are available.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue