From 5264cbf1175e3ea73cf9bcf5087c5028e6cf3b1c Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sat, 4 Jan 2014 16:23:54 -0800 Subject: svc_conferencing, RT#24389 --- httemplate/elements/duration.html | 74 ++++++++++++++++++++++ httemplate/elements/menu.html | 7 ++ .../elements/select-conferencing_quality.html | 7 ++ httemplate/elements/select-conferencing_type.html | 7 ++ httemplate/elements/tr-duration.html | 30 +++++++++ .../elements/tr-select-conferencing_quality.html | 6 ++ .../elements/tr-select-conferencing_type.html | 6 ++ 7 files changed, 137 insertions(+) create mode 100644 httemplate/elements/duration.html create mode 100644 httemplate/elements/select-conferencing_quality.html create mode 100644 httemplate/elements/select-conferencing_type.html create mode 100644 httemplate/elements/tr-duration.html create mode 100644 httemplate/elements/tr-select-conferencing_quality.html create mode 100644 httemplate/elements/tr-select-conferencing_type.html (limited to 'httemplate/elements') diff --git a/httemplate/elements/duration.html b/httemplate/elements/duration.html new file mode 100644 index 000000000..106e56ba0 --- /dev/null +++ b/httemplate/elements/duration.html @@ -0,0 +1,74 @@ +<% $opt{'prefix'} %> + <% $maxlength %> + <% $style %> + <% $opt{autocomplete} ? 'autocomplete="off"' : '' %> + <% $opt{disabled} %> + <% $onchange %> + ><% $opt{'postfix'} %> + +<%init> + +my %opt = @_; + +my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value}; +$value = $value / 60; + +my $onchange = $opt{'onchange'} + ? join(' ', map $_.'="'. $opt{'onchange'}. '(this)"', + qw( onChange onKeyDown onKeyUp onKeyPress ) + ) + : ''; + +$opt{'size'} ||= 4; +my $size = 'SIZE="'. $opt{'size'}. '"'; + +$opt{'maxlength'} ||= 3; +my $maxlength = 'MAXLENGTH="'. $opt{'maxlength'}. '"'; + +$opt{'disabled'} = &{ $opt{'disabled'} }( \%opt ) + if ref($opt{'disabled'}) eq 'CODE'; +$opt{'disabled'} = 'DISABLED' + if $opt{'disabled'} && $opt{'disabled'} !~ /disabled/i; # uuh... yeah? + +my @style = ref($opt{'style'}) + ? @{ $opt{'style'} } + : $opt{'style'} + ? ( $opt{'style'} ) + : (); + +push @style, 'text-align: '. $opt{'text-align'} + if $opt{'text-align'}; + +push @style, 'background-color: #dddddd' + if $opt{'disabled'} && ! $opt{'nodarken_disabled'}; + +my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : ''; + + diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 2ae216c5c..a403bb31e 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -535,6 +535,11 @@ tie my %config_alarm, 'Tie::IxHash', 'Alarm central stations' => [ $fsurl.'browse/alarm_station.html', '' ], ; +tie my %config_conferencing, 'Tie::IxHash', + 'Conferencing types' => [ $fsurl.'browse/conferencing_type.html', '' ], + 'Quality levels' => [ $fsurl.'browse/conferencing_quality.html', '' ], +; + tie my %config_export_svc, 'Tie::IxHash', (); if ( $curuser->access_right('Configuration') ) { $config_export_svc{'Service definitions'} = [ $fsurl.'browse/part_svc.cgi', 'Services are items you offer to your customers' ]; @@ -551,6 +556,8 @@ $config_export_svc{'RADIUS'} = [ \%config_radius, '' ] if $curuser->access_right('Configuration'); $config_export_svc{'Cable'} = [ \%config_cable, '' ] if $curuser->access_right('Configuration'); +$config_export_svc{'Conferencing'} = [ \%config_conferencing, '' ] + if $curuser->access_right('Configuration'); $config_export_svc{'Alarm'} = [ \%config_alarm, '' ] if $curuser->access_right(['Alarm configuration', 'Alarm global configuration']); $config_export_svc{'Hardware types'} = [ $fsurl.'browse/hardware_class.html', 'Set up hardware type catalog' ] diff --git a/httemplate/elements/select-conferencing_quality.html b/httemplate/elements/select-conferencing_quality.html new file mode 100644 index 000000000..b4de267ac --- /dev/null +++ b/httemplate/elements/select-conferencing_quality.html @@ -0,0 +1,7 @@ +<& /elements/select-table.html, + 'table' => 'conferencing_quality', + 'name_col' => 'qualityname', + 'order_by' => 'ORDER BY qualityid', + 'empty_label' => 'Select quality', + @_, +&> diff --git a/httemplate/elements/select-conferencing_type.html b/httemplate/elements/select-conferencing_type.html new file mode 100644 index 000000000..d9245033e --- /dev/null +++ b/httemplate/elements/select-conferencing_type.html @@ -0,0 +1,7 @@ +<& /elements/select-table.html, + 'table' => 'conferencing_type', + 'name_col' => 'typename', + 'order_by' => 'ORDER BY typeid', + 'empty_label' => 'Select type', + @_, +&> diff --git a/httemplate/elements/tr-duration.html b/httemplate/elements/tr-duration.html new file mode 100644 index 000000000..2517302ea --- /dev/null +++ b/httemplate/elements/tr-duration.html @@ -0,0 +1,30 @@ +<%doc> + +Example: + + <& /elements/tr-duration.html, + 'label' => 'Do or do not', + 'field' => 'field_name', + 'value' => 'Y', + &> + + +<% include('tr-td-label.html', @_ ) %> + + > + <% include('duration.html', @_) %> + + + + +<%init> + +my %opt = @_; + +my $onchange = $opt{'onchange'} + ? 'onChange="'. $opt{'onchange'}. '(this)"' + : ''; + +my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : ''; + + diff --git a/httemplate/elements/tr-select-conferencing_quality.html b/httemplate/elements/tr-select-conferencing_quality.html new file mode 100644 index 000000000..ba7a6857c --- /dev/null +++ b/httemplate/elements/tr-select-conferencing_quality.html @@ -0,0 +1,6 @@ +<& /elements/tr-select-table.html, + label => 'Quality', + table => 'conferencing_quality', + name_col => 'qualityname', + @_, +&> diff --git a/httemplate/elements/tr-select-conferencing_type.html b/httemplate/elements/tr-select-conferencing_type.html new file mode 100644 index 000000000..2177fc66f --- /dev/null +++ b/httemplate/elements/tr-select-conferencing_type.html @@ -0,0 +1,6 @@ +<& /elements/tr-select-table.html, + label => 'Conference type', + table => 'conferencing_type', + name_col => 'typename', + @_, +&> -- cgit v1.2.1