X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fbrowse%2Frate.cgi;h=02d670fbd50b0f1435f9fde96a62bddcf4efe58e;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=c31260166645a4beaecf44eebc3854fb69599c29;hpb=673b9a458d9138523026963df6fa3b4683e09bae;p=freeside.git
diff --git a/httemplate/browse/rate.cgi b/httemplate/browse/rate.cgi
index c31260166..02d670fbd 100644
--- a/httemplate/browse/rate.cgi
+++ b/httemplate/browse/rate.cgi
@@ -1,34 +1,64 @@
-
-<%= header("Rate plan listing", menubar( 'Main Menu' => "$p#sysadmin" )) %>
-Rate plans, regions and prefixes for VoIP and call billing.
-Add a rate plan
-| Add a region
-
-
-
-<%= table() %>
-
- Rate plan |
-
-
-<% foreach my $rate ( sort {
- $a->getfield('ratenum') <=> $b->getfield('ratenum')
- } qsearch('rate',{}) ) {
+<% include( 'elements/browse.html',
+ 'title' => 'Rate plans',
+ 'menubar' => [ 'Regions and Prefixes' =>
+ $p.'browse/rate_region.html',
+ ],
+ 'html_init' => $html_init,
+ 'name' => 'rate plans',
+ 'query' => { 'table' => 'rate',
+ 'hashref' => {},
+ 'extra_sql' => 'ORDER BY ratenum',
+ },
+ 'count_query' => $count_query,
+ 'header' => [ '#', 'Rate plan', 'Rates' ],
+ 'fields' => [ 'ratenum', 'ratename', $rates_sub ],
+ 'links' => [ $link, $link, '' ],
+ )
%>
-
- <%= $rate->ratenum %> |
- <%= $rate->ratename %> |
-
+<%once>
-<% } %>
+my $all_countrycodes = join("\n", map qq(