fix FK upgrade for pkg_referral: remove records referencing non-existant customer...
[freeside.git] / httemplate / browse / alarm_type.html
1 <& elements/browse.html,
2      'title'              => 'Alarm system types',
3      'html_init'          => $html_init,
4      'name_singular'      => 'type',
5      'disableable'        => 1,
6      'disabled_statuspos' => 1,
7      'agent_virt'         => 1,
8      'agent_null_right'   => 'Alarm global configuration',
9      'agent_pos'          => 1,
10      'query'              => { 'table'     => 'alarm_type',
11                                'hashref'   => {},
12                                'order_by' => 'ORDER BY inputs, outputs',
13                              },
14      'count_query'        => $count_query,
15      'header'             => $header,
16      'fields'             => $fields,
17      'links'              => $links,
18 &>
19 <%init>
20
21 die "access denied"
22   unless $FS::CurrentUser::CurrentUser->access_right('Alarm configuration')
23       || $FS::CurrentUser::CurrentUser->access_right('Alarm global configuration');
24
25 my $html_init =
26   qq!<A HREF="${p}edit/alarm_type.html"><I>Add an alarm system type</I></A><BR><BR>!;
27
28 my $count_query = 'SELECT COUNT(*) FROM alarm_type';
29
30 my $link = [ $p.'edit/alarm_type.html?', 'alarmtypenum' ];
31
32 my $header = [ 'Type' ];
33 my $fields = [ 'typename' ];
34 my $links  = [ $link ];
35
36 </%init>