default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / browse / alarm_station.html
1 <& elements/browse.html,
2      'title'              => 'Alarm central stations',
3      'html_init'          => $html_init,
4      'name_singlar'       => 'central station',
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_station',
11                                'hashref'   => {},
12                                'order_by' => 'ORDER BY stationname',
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
26 my $html_init =
27   qq!<A HREF="${p}edit/alarm_station.html"><I>Add an alarm central station</I></A><BR><BR>!;
28
29 my $count_query = 'SELECT COUNT(*) FROM alarm_station';
30
31 my $link = [ $p.'edit/alarm_station.html?', 'alarmstationnum' ];
32
33 my $header = [ 'Central station' ];
34 my $fields = [ 'stationname' ];
35 my $links  = [ $link ];
36
37 </%init>