summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/browse/alarm_station.html37
-rw-r--r--httemplate/browse/alarm_system.html36
-rw-r--r--httemplate/browse/alarm_type.html36
-rw-r--r--httemplate/edit/alarm_station.html23
-rw-r--r--httemplate/edit/alarm_system.html23
-rw-r--r--httemplate/edit/alarm_type.html25
-rw-r--r--httemplate/edit/process/alarm_station.html11
-rw-r--r--httemplate/edit/process/alarm_system.html11
-rw-r--r--httemplate/edit/process/alarm_type.html11
-rw-r--r--httemplate/elements/select-alarm_station.html7
-rw-r--r--httemplate/elements/select-alarm_system.html7
-rw-r--r--httemplate/elements/select-alarm_type.html8
-rw-r--r--httemplate/elements/tr-select-alarm_station.html12
-rw-r--r--httemplate/elements/tr-select-alarm_system.html12
-rw-r--r--httemplate/elements/tr-select-alarm_type.html12
15 files changed, 271 insertions, 0 deletions
diff --git a/httemplate/browse/alarm_station.html b/httemplate/browse/alarm_station.html
new file mode 100644
index 000000000..8fa2846f4
--- /dev/null
+++ b/httemplate/browse/alarm_station.html
@@ -0,0 +1,37 @@
+<& elements/browse.html,
+ 'title' => 'Alarm central stations',
+ 'html_init' => $html_init,
+ 'name_singlar' => 'central station',
+ 'disableable' => 1,
+ 'disabled_statuspos' => 1,
+ 'agent_virt' => 1,
+ 'agent_null_right' => 'Alarm global configuration',
+ 'agent_pos' => 1,
+ 'query' => { 'table' => 'alarm_station',
+ 'hashref' => {},
+ 'order_by' => 'ORDER BY stationname',
+ },
+ 'count_query' => $count_query,
+ 'header' => $header,
+ 'fields' => $fields,
+ 'links' => $links,
+&>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Alarm configuration')
+ || $FS::CurrentUser::CurrentUser->access_right('Alarm global configuration');
+
+
+my $html_init =
+ qq!<A HREF="${p}edit/alarm_station.html"><I>Add an alarm central station</I></A><BR><BR>!;
+
+my $count_query = 'SELECT COUNT(*) FROM alarm_station';
+
+my $link = [ $p.'edit/alarm_station.html?', 'alarmstationnum' ];
+
+my $header = [ 'Central station' ];
+my $fields = [ 'stationname' ];
+my $links = [ $link ];
+
+</%init>
diff --git a/httemplate/browse/alarm_system.html b/httemplate/browse/alarm_system.html
new file mode 100644
index 000000000..9cd104dbe
--- /dev/null
+++ b/httemplate/browse/alarm_system.html
@@ -0,0 +1,36 @@
+<& elements/browse.html,
+ 'title' => 'Alarm system vendors',
+ 'html_init' => $html_init,
+ 'name_singular' => 'vendor',
+ 'disableable' => 1,
+ 'disabled_statuspos' => 1,
+ 'agent_virt' => 1,
+ 'agent_null_right' => 'Alarm global configuration',
+ 'agent_pos' => 1,
+ 'query' => { 'table' => 'alarm_system',
+ 'hashref' => {},
+ 'order_by' => 'ORDER BY systemname',
+ },
+ 'count_query' => $count_query,
+ 'header' => $header,
+ 'fields' => $fields,
+ 'links' => $links,
+&>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Alarm configuration')
+ || $FS::CurrentUser::CurrentUser->access_right('Alarm global configuration');
+
+my $html_init =
+ qq!<A HREF="${p}edit/alarm_system.html"><I>Add an alarm system vendor</I></A><BR><BR>!;
+
+my $count_query = 'SELECT COUNT(*) FROM alarm_system';
+
+my $link = [ $p.'edit/alarm_system.html?', 'alarmsystemnum' ];
+
+my $header = [ 'Vendor' ];
+my $fields = [ 'systemname' ];
+my $links = [ $link ];
+
+</%init>
diff --git a/httemplate/browse/alarm_type.html b/httemplate/browse/alarm_type.html
new file mode 100644
index 000000000..35def961d
--- /dev/null
+++ b/httemplate/browse/alarm_type.html
@@ -0,0 +1,36 @@
+<& elements/browse.html,
+ 'title' => 'Alarm system types',
+ 'html_init' => $html_init,
+ 'name_singular' => 'type',
+ 'disableable' => 1,
+ 'disabled_statuspos' => 1,
+ 'agent_virt' => 1,
+ 'agent_null_right' => 'Alarm global configuration',
+ 'agent_pos' => 1,
+ 'query' => { 'table' => 'alarm_type',
+ 'hashref' => {},
+ 'order_by' => 'ORDER BY inputs, outputs',
+ },
+ 'count_query' => $count_query,
+ 'header' => $header,
+ 'fields' => $fields,
+ 'links' => $links,
+&>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Alarm configuration')
+ || $FS::CurrentUser::CurrentUser->access_right('Alarm global configuration');
+
+my $html_init =
+ qq!<A HREF="${p}edit/alarm_type.html"><I>Add an alarm system type</I></A><BR><BR>!;
+
+my $count_query = 'SELECT COUNT(*) FROM alarm_type';
+
+my $link = [ $p.'edit/alarm_type.html?', 'alarmtypenum' ];
+
+my $header = [ 'Type' ];
+my $fields = [ 'typename' ];
+my $links = [ $link ];
+
+</%init>
diff --git a/httemplate/edit/alarm_station.html b/httemplate/edit/alarm_station.html
new file mode 100644
index 000000000..0d088dfdc
--- /dev/null
+++ b/httemplate/edit/alarm_station.html
@@ -0,0 +1,23 @@
+<& elements/edit.html,
+ 'table' => 'alarm_station',
+ 'name_singular' => 'central station',
+ 'agent_virt' => 1,
+ 'agent_null_right' => 'Alarm global configuration',
+ 'fields' => [
+ { field=>'stationname', type=>'text', size=>20 },
+ { field=>'disabled', type=>'checkbox', value=>'Y' },
+ ],
+ 'labels' => { 'alarmstationnum' => 'Central Station',
+ 'agentnum' => 'Agent',
+ 'stationname' => 'Central Station',
+ 'disabled' => 'Disabled',
+ },
+ 'viewall_dir' => 'browse',
+&>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Alarm configuration')
+ || $FS::CurrentUser::CurrentUser->access_right('Alarm global configuration');
+
+</%init>
diff --git a/httemplate/edit/alarm_system.html b/httemplate/edit/alarm_system.html
new file mode 100644
index 000000000..c9e0076c6
--- /dev/null
+++ b/httemplate/edit/alarm_system.html
@@ -0,0 +1,23 @@
+<& elements/edit.html,
+ 'table' => 'alarm_system',
+ 'name_singular' => 'vendor',
+ 'agent_virt' => 1,
+ 'agent_null_right' => 'Alarm global configuration',
+ 'fields' => [
+ { field=>'systemname', type=>'text', size=>20 },
+ { field=>'disabled', type=>'checkbox', value=>'Y' },
+ ],
+ 'labels' => { 'alarmsystemnum' => 'Vendor',
+ 'agentnum' => 'Agent',
+ 'systemname' => 'Vendor',
+ 'disabled' => 'Disabled',
+ },
+ 'viewall_dir' => 'browse',
+&>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Alarm configuration')
+ || $FS::CurrentUser::CurrentUser->access_right('Alarm global configuration');
+
+</%init>
diff --git a/httemplate/edit/alarm_type.html b/httemplate/edit/alarm_type.html
new file mode 100644
index 000000000..1ef02f4d2
--- /dev/null
+++ b/httemplate/edit/alarm_type.html
@@ -0,0 +1,25 @@
+<& elements/edit.html,
+ 'table' => 'alarm_type',
+ 'name_singular' => 'type',
+ 'agent_virt' => 1,
+ 'agent_null_right' => 'Alarm global configuration',
+ 'fields' => [
+ { field=>'inputs', type=>'text', size=>2 },
+ { field=>'outputs', type=>'text', size=>2 },
+ { field=>'disabled', type=>'checkbox', value=>'Y'},
+ ],
+ 'labels' => { 'alarmtypenum' => 'Type',
+ 'agentnum' => 'Agent',
+ 'inputs' => 'Inputs',
+ 'outputs' => 'Outputs',
+ 'disabled' => 'Disabled',
+ },
+ 'viewall_dir' => 'browse',
+&>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Alarm configuration')
+ || $FS::CurrentUser::CurrentUser->access_right('Alarm global configuration');
+
+</%init>
diff --git a/httemplate/edit/process/alarm_station.html b/httemplate/edit/process/alarm_station.html
new file mode 100644
index 000000000..17ea07473
--- /dev/null
+++ b/httemplate/edit/process/alarm_station.html
@@ -0,0 +1,11 @@
+<& elements/process.html,
+ 'table' => 'alarm_station',
+ 'viewall_dir' => 'browse',
+&>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Alarm configuration')
+ || $FS::CurrentUser::CurrentUser->access_right('Alarm global configuration');
+
+</%init>
diff --git a/httemplate/edit/process/alarm_system.html b/httemplate/edit/process/alarm_system.html
new file mode 100644
index 000000000..5fc663005
--- /dev/null
+++ b/httemplate/edit/process/alarm_system.html
@@ -0,0 +1,11 @@
+<& elements/process.html,
+ 'table' => 'alarm_system',
+ 'viewall_dir' => 'browse',
+&>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Alarm configuration')
+ || $FS::CurrentUser::CurrentUser->access_right('Alarm global configuration');
+
+</%init>
diff --git a/httemplate/edit/process/alarm_type.html b/httemplate/edit/process/alarm_type.html
new file mode 100644
index 000000000..ede0051bf
--- /dev/null
+++ b/httemplate/edit/process/alarm_type.html
@@ -0,0 +1,11 @@
+<& elements/process.html,
+ 'table' => 'alarm_type',
+ 'viewall_dir' => 'browse',
+&>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Alarm configuration')
+ || $FS::CurrentUser::CurrentUser->access_right('Alarm global configuration');
+
+</%init>
diff --git a/httemplate/elements/select-alarm_station.html b/httemplate/elements/select-alarm_station.html
new file mode 100644
index 000000000..04d1383b0
--- /dev/null
+++ b/httemplate/elements/select-alarm_station.html
@@ -0,0 +1,7 @@
+<% include( '/elements/select-table.html',
+ 'table' => 'alarm_station',
+ 'name_col' => 'stationname',
+ 'empty_label' => 'Select central station',
+ @_,
+ )
+%>
diff --git a/httemplate/elements/select-alarm_system.html b/httemplate/elements/select-alarm_system.html
new file mode 100644
index 000000000..7f22fcefa
--- /dev/null
+++ b/httemplate/elements/select-alarm_system.html
@@ -0,0 +1,7 @@
+<% include( '/elements/select-table.html',
+ 'table' => 'alarm_system',
+ 'name_col' => 'systemname',
+ 'empty_label' => 'Select vendor',
+ @_,
+ )
+%>
diff --git a/httemplate/elements/select-alarm_type.html b/httemplate/elements/select-alarm_type.html
new file mode 100644
index 000000000..5f15988b0
--- /dev/null
+++ b/httemplate/elements/select-alarm_type.html
@@ -0,0 +1,8 @@
+<% include( '/elements/select-table.html',
+ 'table' => 'alarm_type',
+ 'name_col' => 'typename',
+ 'order_by' => 'ORDER BY inputs, outputs',
+ 'empty_label' => 'Select type',
+ @_,
+ )
+%>
diff --git a/httemplate/elements/tr-select-alarm_station.html b/httemplate/elements/tr-select-alarm_station.html
new file mode 100644
index 000000000..71ed0db0c
--- /dev/null
+++ b/httemplate/elements/tr-select-alarm_station.html
@@ -0,0 +1,12 @@
+% #if ( scalar(@domains) < 2 ) {
+% #} else {
+ <TR>
+ <TD ALIGN="right"><% $opt{'label'} || 'Central Station' %></TD>
+ <TD>
+ <% include( '/elements/select-alarm_station.html', %opt) %>
+ </TD>
+ </TR>
+% #}
+<%init>
+ my %opt = @_;
+</%init>
diff --git a/httemplate/elements/tr-select-alarm_system.html b/httemplate/elements/tr-select-alarm_system.html
new file mode 100644
index 000000000..a46a015f2
--- /dev/null
+++ b/httemplate/elements/tr-select-alarm_system.html
@@ -0,0 +1,12 @@
+% #if ( scalar(@domains) < 2 ) {
+% #} else {
+ <TR>
+ <TD ALIGN="right"><% $opt{'label'} || 'Vendor' %></TD>
+ <TD>
+ <% include( '/elements/select-alarm_system.html', %opt) %>
+ </TD>
+ </TR>
+% #}
+<%init>
+ my %opt = @_;
+</%init>
diff --git a/httemplate/elements/tr-select-alarm_type.html b/httemplate/elements/tr-select-alarm_type.html
new file mode 100644
index 000000000..b929fb8e6
--- /dev/null
+++ b/httemplate/elements/tr-select-alarm_type.html
@@ -0,0 +1,12 @@
+% #if ( scalar(@domains) < 2 ) {
+% #} else {
+ <TR>
+ <TD ALIGN="right"><% $opt{'label'} || 'Type' %></TD>
+ <TD>
+ <% include( '/elements/select-alarm_type.html', %opt) %>
+ </TD>
+ </TR>
+% #}
+<%init>
+ my %opt = @_;
+</%init>