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