X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Faccess_user.html;h=6a1fea1ce00b438e6564e38d9fb94ef17a458965;hb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125;hp=2aa752b7389839baffb872740e5fa84a9813b365;hpb=c648976f0b7975f2328ebd7ba8c711fad0ca4195;p=freeside.git
diff --git a/httemplate/browse/access_user.html b/httemplate/browse/access_user.html
index 2aa752b73..6a1fea1ce 100644
--- a/httemplate/browse/access_user.html
+++ b/httemplate/browse/access_user.html
@@ -1,13 +1,13 @@
<% include( 'elements/browse.html',
- 'title' => 'Internal Users',
- 'menubar' => [ 'Internal access groups' => $p.'browse/access_group.html', ],
+ 'title' => 'Employees',
+ 'menubar' => [ 'View Employee groups' => $p.'browse/access_group.html', ],
'html_init' => $html_init,
- 'name' => 'internal users',
+ 'name' => 'employees',
'disableable' => 1,
'disabled_statuspos' => 2,
'query' => { 'table' => 'access_user',
'hashref' => {},
- 'extra_sql' => 'ORDER BY last, first'
+ 'order_by' => 'ORDER BY last, first'
},
'count_query' => $count_query,
'header' => \@header,
@@ -22,8 +22,8 @@ die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
my $html_init =
- "Internal users have access to the back-office interface. Typically, this is your employees and contractors. In a VISP setup, you can also add accounts for your reseller's employees.
It is highly recommended to add a separate account for each person rather than using role accounts.
".
- qq!Add an internal user
!;
+ "Employees have access to the back-office interface. Typically, this is your employees and contractors. In a virtualized setup, you can also add accounts for your reseller's employees.
It is highly recommended to add a separate account for each person rather than using role accounts.
".
+ qq!Add an employee
!;
#false laziness w/access_group.html & agent_type.cgi
my $groups_sub = sub {
@@ -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>