import torrus 1.0.9
[freeside.git] / httemplate / browse / pkg_category.html
1 <% include( 'elements/browse.html',
2                  'title'       => 'Package categories',
3                  'html_init'   => $html_init,
4                  'name'        => 'package categories',
5                  'disableable' => 1,
6                  'disabled_statuspos' => 3,
7                  'query'       => { 'table'     => 'pkg_category',
8                                     'hashref'   => {},
9                                     'order_by' => 'ORDER BY categorynum',
10                                   },
11                  'count_query' => $count_query,
12                  'header'      => [ '#', 'Category', 'Weight', 'Condense' ],
13                  'fields'      => [ 'categorynum', 'categoryname', 'weight', 'condense' ],
14                  'links'       => [ $link, $link, $link, $link ],
15              )
16 %>
17
18 <%init>
19
20 die "access denied"
21   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
22
23 my $html_init = 
24   qq!<A HREF="${p}browse/pkg_class.html">Package classes</A><BR><BR>!.
25   'Package categories define groups of package classes, used for sectioned invoices.<BR><BR>'.
26   qq!<A HREF="${p}edit/pkg_category.html"><I>Add a package category</I></A><BR><BR>!;
27
28 my $count_query = 'SELECT COUNT(*) FROM pkg_category';
29
30 my $link = [ $p.'edit/pkg_category.html?', 'categorynum' ];
31
32 </%init>