4 'Agent types define groups of packages that you can then assign to'.
5 ' particular agents.<BR><BR>'.
6 qq!<A HREF="${p}edit/agent_type.cgi"><I>Add a new agent type</I></A><BR><BR>!;
8 my $count_query = 'SELECT COUNT(*) FROM agent_type';
10 #false laziness w/access_user.html
11 my $packages_sub = sub {
12 my $agent_type = shift;
16 my $part_pkg = $type_pkgs->part_pkg;
19 'data' => $part_pkg->pkg. ' - '. $part_pkg->comment,
21 'link' => $p. 'edit/part_pkg.cgi?'. $type_pkgs->pkgpart,
28 $_->part_pkg and ! $_->part_pkg->disabled
30 $agent_type->type_pkgs #XXX the method should order itself by something
35 my $link = [ $p.'edit/agent_type.cgi?', 'typenum' ];
37 %><%= include( 'elements/browse.html',
38 'title' => 'Agent Types',
39 'menubar' => [ #'Main menu' => $p,
40 'Agents' =>"${p}browse/agent.cgi",
42 'html_init' => $html_init,
43 'name' => 'agent types',
44 'query' => { 'table' => 'agent_type',
46 'extra_sql' => 'ORDER BY typenum', # 'ORDER BY atype',
48 'count_query' => $count_query,
53 'fields' => [ 'typenum',