X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Frate.cgi;h=428158a6d2490734a8806eedd913919f206727ea;hb=9a98d39e3ce40c1f2c324991e8ad469271093fb5;hp=4718b7147f5434c55cdb8a981cdc2d607dd790b5;hpb=c1bb4ddb71147d0571bd301a6d8c452fdf0e1bc9;p=freeside.git
diff --git a/httemplate/browse/rate.cgi b/httemplate/browse/rate.cgi
index 4718b7147..428158a6d 100644
--- a/httemplate/browse/rate.cgi
+++ b/httemplate/browse/rate.cgi
@@ -1,34 +1,66 @@
-
-<%= include("/elements/header.html","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',
+ 'Time Periods' =>
+ $p.'browse/rate_time.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(