1 <% include( 'elements/browse.html',
2 'title' => 'Agent Types',
3 'menubar' => [ #'Main menu' => $p,
4 'Agents' =>"${p}browse/agent.cgi",
6 'html_init' => $html_init,
7 'name' => 'agent types',
8 'query' => { 'table' => 'agent_type',
10 'extra_sql' => 'ORDER BY typenum', # 'ORDER BY atype',
12 'count_query' => $count_query,
17 'fields' => [ 'typenum',
30 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
33 'Agent types define groups of packages that you can then assign to'.
34 ' particular agents.<BR><BR>'.
35 qq!<A HREF="${p}edit/agent_type.cgi"><I>Add a new agent type</I></A><BR><BR>!;
37 my $count_query = 'SELECT COUNT(*) FROM agent_type';
39 #false laziness w/access_user.html
40 my $packages_sub = sub {
41 my $agent_type = shift;
45 #my $part_pkg = $type_pkgs->part_pkg;
48 #'data' => $part_pkg->pkg. ' - '. $part_pkg->comment,
49 'data' => $type_pkgs->pkg. ' - '. $type_pkgs->comment,
51 'link' => $p. 'edit/part_pkg.cgi?'. $type_pkgs->pkgpart,
56 $agent_type->type_pkgs_enabled
61 my $link = [ $p.'edit/agent_type.cgi?', 'typenum' ];