X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Faccess_user.html;h=321025b6932953f9f5a3a905b475e9e38e141db1;hb=0fcdc36642e1430f02ebf5326740e231883bd41f;hp=be11bf82a4b5f2506f27b1241849f965807372c6;hpb=c738a3c4923774b64960aa87fa58bd0751487edb;p=freeside.git diff --git a/httemplate/browse/access_user.html b/httemplate/browse/access_user.html index be11bf82a..321025b69 100644 --- a/httemplate/browse/access_user.html +++ b/httemplate/browse/access_user.html @@ -1,8 +1,29 @@ -<% +<% include( 'elements/browse.html', + 'title' => 'Employees', + 'menubar' => [ 'View Employee groups' => $p.'browse/access_group.html', ], + 'html_init' => $html_init, + 'name' => 'employees', + 'disableable' => 1, + 'disabled_statuspos' => 2, + 'query' => { 'table' => 'access_user', + 'hashref' => {}, + 'extra_sql' => 'ORDER BY last, first' + }, + 'count_query' => $count_query, + 'header' => \@header, + 'fields' => \@fields, + 'links' => \@links, + 'align' => $align, + ) +%> +<%init> + +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, but 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 { @@ -32,32 +53,9 @@ my $count_query = 'SELECT COUNT(*) FROM access_user'; my $link = [ $p.'edit/access_user.html?', 'usernum' ]; -%><%= include( 'elements/browse.html', - 'title' => 'Internal Users', - 'menubar' => [ #'Main menu' => $p, - 'Internal access groups' => $p.'browse/access_group.html', - ], - 'html_init' => $html_init, - 'name' => 'internal users', - 'query' => { 'table' => 'access_user', - 'hashref' => {}, - 'extra_sql' => 'ORDER BY last, first', - }, - 'count_query' => $count_query, - 'header' => [ '#', - 'Username', - 'Full name', - 'Groups' - ], - 'fields' => [ 'usernum', - 'username', - 'name', # sub { shift->name }, - $groups_sub, - ], - 'links' => [ $link, - $link, - $link, - '' - ], - ) -%> +my @header = ( '#', 'Username', 'Full name', 'Groups' ); +my @fields = ( 'usernum', 'username', 'name', $groups_sub ); +my $align = 'rlll'; +my @links = ( $link, $link, $link, '' ); + +