Implement admin peering widget.

Also fix singular/plural handling in names.
agranig/1_0_subfix
Andreas Granig 12 years ago
parent 761aab3220
commit f7433e3b8a

@ -22,7 +22,16 @@ has 'priority' => (
around handle => sub { around handle => sub {
my ($foo, $self, $c) = @_; my ($foo, $self, $c) = @_;
$c->log->debug("AdminPeeringOverview::handle"); my $peer_groups = $c->model('provisioning')->resultset('voip_peer_groups')->search_rs({});
my $peer_hosts = $peer_groups->search_related_rs('voip_peer_hosts');
my $peer_rules = $peer_groups->search_related_rs('voip_peer_rules');
$c->stash(
groups => $peer_groups,
hosts => $peer_hosts,
rules => $peer_rules,
);
return; return;
}; };

@ -3,14 +3,14 @@
<div class="plan-header"> <div class="plan-header">
<div class="plan-title">Peerings</div> <div class="plan-title">Peerings</div>
<div class="plan-price"> <div class="plan-price">
<span>7</span> <span>[% groups.count %]</span>
<span class="term">Peering Groups</span> <span class="term">Peering Group[% groups.count == 1 ? "" : "s" %]</span>
</div> </div>
</div> </div>
<div class="plan-features"> <div class="plan-features">
<ul> <ul>
<li><strong>12</strong> Peering Servers</li> <li><strong>[% hosts.count %]</strong> Peering Server[% hosts.count == 1 ? "" : "s" %]</li>
<li><strong>24</strong> Peering Rules</li> <li><strong>[% rules.count %]</strong> Peering Rule[% rules.count == 1 ? "" : "s" %]</li>
</ul> </ul>
</div> </div>
<div class="plan-actions"> <div class="plan-actions">

@ -4,14 +4,14 @@
<div class="plan-title">Resellers</div> <div class="plan-title">Resellers</div>
<div class="plan-price"> <div class="plan-price">
<span>[% resellers.count %]</span> <span>[% resellers.count %]</span>
<span class="term">Resellers</span> <span class="term">Reseller[% resellers.count == 1 ? "" : "s" %]</span>
</div> </div>
</div> </div>
<div class="plan-features"> <div class="plan-features">
<ul> <ul>
<li><strong>[% domains.count %]</strong> Domains</li> <li><strong>[% domains.count %]</strong> Domain[% domains.count == 1 ? "" : "s" %]</li>
<li><strong>[% customers.count %]</strong> Customers</li> <li><strong>[% customers.count %]</strong> Customer[% customers.count == 1 ? "" : "s" %]</li>
<li><strong>[% subscribers.count %]</strong> Subscribers</li> <li><strong>[% subscribers.count %]</strong> Subscriber[% subscribers.count == 1 ? "" : "s" %]</li>
</ul> </ul>
</div> </div>
<div class="plan-actions"> <div class="plan-actions">

Loading…
Cancel
Save