summaryrefslogtreecommitdiff
path: root/httemplate/browse/pkg_category.html
blob: e85c0dd9c1e4f8cfc90ae1ca14d8b74e2f0cba90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<% include( 'elements/browse.html',
                 'title'       => 'Package categories',
                 'html_init'   => $html_init,
                 'name'        => 'package categories',
                 'disableable' => 1,
                 'disabled_statuspos' => 2,
                 'query'       => { 'table'     => 'pkg_category',
                                    'hashref'   => {},
                                    'extra_sql' => 'ORDER BY categorynum',
                                  },
                 'count_query' => $count_query,
                 'header'      => [ '#', 'Category', 'Weight' ],
                 'fields'      => [ 'categorynum', 'categoryname', 'weight' ],
                 'links'       => [ $link, $link, $link ],
             )
%>

<%init>

die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');

my $html_init = 
  qq!<A HREF="${p}browse/pkg_class.html">Package classes</A><BR><BR>!.
  'Package categories define groups of package classes, for reporting and '.
  'convenience purposes.<BR><BR>'.
  qq!<A HREF="${p}edit/pkg_category.html"><I>Add a package category</I></A><BR><BR>!;

my $count_query = 'SELECT COUNT(*) FROM pkg_category';

my $link = [ $p.'edit/pkg_category.html?', 'categorynum' ];

</%init>