Implement subscriber login call-list/voicemails.

agranig/peering-route
Andreas Granig 13 years ago
parent 1dcd7029ca
commit b8cf0895ba

@ -1545,6 +1545,22 @@ sub details :Chained('master') :PathPart('') :Args(0) {
$c->stash->{prov_lock_string} = NGCP::Panel::Utils::Subscriber::get_lock_string($locklevel);
}
sub voicemails :Chained('master') :PathPart('voicemails') :Args(0) {
my ($self, $c) = @_;
$c->stash(
template => 'subscriber/voicemail.tt'
);
}
sub calllist :Chained('master') :PathPart('calls') :Args(0) {
my ($self, $c) = @_;
$c->stash(
template => 'subscriber/calllist.tt'
);
}
sub edit_master :Chained('master') :PathPart('edit') :Args(0) {
my ($self, $c) = @_;
my $subscriber = $c->stash->{subscriber};

@ -0,0 +1,32 @@
package NGCP::Panel::Widget::Plugin::SubscriberAdminTopMenuSettings;
use Moose::Role;
has 'template' => (
is => 'ro',
isa => 'Str',
default => 'widgets/subscriberadmin_topmenu_settings.tt'
);
has 'type' => (
is => 'ro',
isa => 'Str',
default => 'topmenu_widgets',
);
around handle => sub {
my ($foo, $self, $c) = @_;
return;
};
sub filter {
my ($self, $c, $type) = @_;
return $self if(
$type eq $self->type &&
$c->user_in_realm('subscriberadmin')
);
return;
}
1;
# vim: set syntax=perl tabstop=4 expandtab:

@ -0,0 +1,32 @@
package NGCP::Panel::Widget::Plugin::SubscriberTopMenuSettings;
use Moose::Role;
has 'template' => (
is => 'ro',
isa => 'Str',
default => 'widgets/subscriber_topmenu_settings.tt'
);
has 'type' => (
is => 'ro',
isa => 'Str',
default => 'topmenu_widgets',
);
around handle => sub {
my ($foo, $self, $c) = @_;
return;
};
sub filter {
my ($self, $c, $type) = @_;
return $self if(
$type eq $self->type &&
$c->user_in_realm('subscriber')
);
return;
}
1;
# vim: set syntax=perl tabstop=4 expandtab:

@ -44,7 +44,7 @@
</ul>
</div>
<div class="plan-actions">
<a href="[% c.uri_for('/subscriber') %]" class="btn">View Call List</a>
<a href="[% c.uri_for_action('/subscriber/calllist', [subscriber.id]) %]" class="btn">View Call List</a>
</div>
</div>
</div>

@ -0,0 +1,12 @@
<li class="dropdown">
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
<i class="icon-th"></i>
<span>Settings</span>
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="[% c.uri_for_action('/subscriber/calllist', [subscriber.id]) %]">Call List</a></li>
<li><a href="[% c.uri_for_action('/subscriber/voicemail', [subscriber.id]) %]">Voicebox Messages</a></li>
</ul>
</li>
[% # vim: set tabstop=4 syntax=html expandtab: -%]

@ -31,7 +31,7 @@
</ul>
</div>
<div class="plan-actions">
<a href="[% c.uri_for('/subscriber') %]" class="btn">View Voicebox Messages</a>
<a href="[% c.uri_for_action('/subscriber/voicemails', [subscriber.id]) %]" class="btn">View Voicebox Messages</a>
</div>
</div>
</div>

@ -0,0 +1,13 @@
<li class="dropdown">
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
<i class="icon-th"></i>
<span>Settings</span>
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="[% c.uri_for_action('/subscriber/calllist', [subscriber.id]) %]">Call List</a></li>
<li><a href="[% c.uri_for_action('/subscriber/voicemail', [subscriber.id]) %]">Voicebox Messages</a></li>
<li><a href="#">Subscriber Admin Test</a></li>
</ul>
</li>
[% # vim: set tabstop=4 syntax=html expandtab: -%]
Loading…
Cancel
Save