summaryrefslogtreecommitdiff
path: root/httemplate/browse
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/browse')
-rw-r--r--httemplate/browse/access_user.html24
-rw-r--r--httemplate/browse/rate_detail.html20
2 files changed, 34 insertions, 10 deletions
diff --git a/httemplate/browse/access_user.html b/httemplate/browse/access_user.html
index 321025b69..3162e3a6c 100644
--- a/httemplate/browse/access_user.html
+++ b/httemplate/browse/access_user.html
@@ -49,13 +49,29 @@ my $groups_sub = sub {
};
+my $cust_sub = sub {
+ my $access_user = shift;
+ $access_user->user_custnum ? $access_user->user_cust_main->name : '';
+};
+my $cust_link = [ $p.'view/cust_main.cgi?custnum=', 'user_custnum' ];
+
my $count_query = 'SELECT COUNT(*) FROM access_user';
my $link = [ $p.'edit/access_user.html?', 'usernum' ];
-my @header = ( '#', 'Username', 'Full name', 'Groups' );
-my @fields = ( 'usernum', 'username', 'name', $groups_sub );
-my $align = 'rlll';
-my @links = ( $link, $link, $link, '' );
+my @header = ( '#', 'Username', 'Full name', 'Groups', 'Customer' );
+my @fields = ( 'usernum', 'username', 'name', $groups_sub, $cust_sub, );
+my $align = 'rllll';
+my @links = ( $link, $link, $link, '', $cust_link );
+
+#if ( FS::Conf->new->config('ticket_system') ) {
+# push @header, 'Ticketing';
+# push @fields, sub {
+# my $access_user = shift;
+#
+# };
+# $align .= 'l';
+# push @links, '';
+#}
</%init>
diff --git a/httemplate/browse/rate_detail.html b/httemplate/browse/rate_detail.html
index 23bc23ff8..3371926b4 100644
--- a/httemplate/browse/rate_detail.html
+++ b/httemplate/browse/rate_detail.html
@@ -15,6 +15,7 @@
'Region',
'Prefix(es)',
'Included<BR>minutes',
+ 'Connection<BR>charge',
'Charge per<BR>minute',
'Granularity',
'Usage class',
@@ -22,12 +23,9 @@
'fields' => [
'regionname',
sub { shift->dest_region->prefixes_short },
- sub { shift->min_included.
- '&nbsp;<FONT SIZE="-1">(edit)</FONT>';
- },
- sub { $money_char. shift->min_charge.
- '&nbsp;<FONT SIZE="-1">(edit)</FONT>';
- },
+ sub { shift->min_included. $edit_hint },
+ $conn_charge_sub,
+ sub { $money_char. shift->min_charge. $edit_hint },
sub { $granularity{ shift->sec_granularity } },
'classname',
],
@@ -39,6 +37,7 @@
<%once>
tie my %granularity, 'Tie::IxHash', FS::rate_detail::granularities();
+tie my %conn_secs, 'Tie::IxHash', FS::rate_detail::conn_secs();
my $conf = new FS::Conf;
my $money_char = $conf->config('money_char') || '$';
@@ -59,6 +58,15 @@ my $edit_onclick = sub {
#default# 'color' => '#333399',
);
};
+my $edit_hint = '&nbsp;<FONT SIZE="-1">(edit)</FONT>';
+
+my $conn_charge_sub = sub {
+ my $rate_detail = shift;
+ #return '' unless $rate_detail->conn_charge > 0 || $rate_detail->conn_sec;
+ $money_char. $rate_detail->conn_charge.
+ ($rate_detail->conn_sec ? ' for '.$conn_secs{$rate_detail->conn_sec} : '').
+ $edit_hint;
+};
</%once>
<%init>