From: Mark Wells Date: Tue, 4 Aug 2015 20:03:48 +0000 (-0700) Subject: rename view/svc_circuit.html to fix links from package reports, #37420 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=f6860de28c7d561312b6ba1e6fb67799a08c7306 rename view/svc_circuit.html to fix links from package reports, #37420 --- diff --git a/httemplate/edit/process/svc_circuit.html b/httemplate/edit/process/svc_circuit.html index 27f43db38..06cd7e70b 100644 --- a/httemplate/edit/process/svc_circuit.html +++ b/httemplate/edit/process/svc_circuit.html @@ -1,7 +1,7 @@ <& elements/svc_Common.html, table => 'svc_circuit', edit_ext => 'html', - redirect => popurl(3)."view/svc_circuit.html?", + redirect => popurl(3)."view/svc_circuit.cgi?", precheck_callback => $precheck, &> <%init> diff --git a/httemplate/search/svc_circuit.cgi b/httemplate/search/svc_circuit.cgi old mode 100755 new mode 100644 index c14c55fdc..8f05e0488 --- a/httemplate/search/svc_circuit.cgi +++ b/httemplate/search/svc_circuit.cgi @@ -3,7 +3,7 @@ 'name' => 'circuit services', 'query' => $query, 'count_query' => $query->{'count_query'}, - 'redirect' => [ popurl(2). "view/svc_circuit.html?", 'svcnum' ], + 'redirect' => [ popurl(2). "view/svc_circuit.cgi?", 'svcnum' ], 'header' => [ '#', 'Provider', 'Type', @@ -60,6 +60,6 @@ if ( $cgi->param('magic') eq 'unlinked' ) { my $query = FS::svc_circuit->search(\%search_hash); -my $link = [ $p.'view/svc_circuit.html?', 'svcnum' ]; +my $link = [ $p.'view/svc_circuit.cgi?', 'svcnum' ]; diff --git a/httemplate/view/svc_circuit.cgi b/httemplate/view/svc_circuit.cgi new file mode 100644 index 000000000..579ef5150 --- /dev/null +++ b/httemplate/view/svc_circuit.cgi @@ -0,0 +1,81 @@ +<& elements/svc_Common.html, + 'table' => 'svc_circuit', + 'labels' => \%labels, + 'fields' => \@fields, + 'html_foot' => sub { $self->call_method('.foot', @_) }, + 'edit_url' => $fsurl.'edit/svc_circuit.html?', +&> +<%method .foot> +% my $svc_circuit = shift; +% my $link = [ 'svc_phone.cgi?', 'svcnum' ]; +% if ( FS::svc_phone->count('circuit_svcnum = '.$svc_circuit->svcnum) ) { +<& /search/elements/search.html, + + 'title' => 'Provisioned phone services', + 'name_singular' => 'phone number', + 'query' => { 'table' => 'svc_phone', + 'hashref' => { 'circuit_svcnum' => $svc_circuit->svcnum }, + 'addl_from' => ' LEFT JOIN cust_svc USING (svcnum)'. + ' LEFT JOIN part_svc USING (svcpart)', + 'select' => 'svc_phone.*, part_svc.*', + }, + 'count_query' => 'SELECT COUNT(*) FROM svc_phone WHERE circuit_svcnum = '. + $svc_circuit->svcnum, + 'header' => [ '#', 'Service', 'Phone number', ], + 'fields' => [ 'svcnum', 'svc', 'phonenum' ], + 'links' => [ $link, $link, $link ], + 'align' => 'rlr', + + 'html_form' => 'Phone services', + 'nohtmlheader' => 1, + 'disable_total' => 1, + 'disable_maxselect' => 1, + 'really_disable_download' => 1, +&> +
+% } + +<%init> + +my @fields = ( + 'circuit_id', + { field => 'providernum', + type => 'select-table', + table => 'circuit_provider', + name_col => 'provider', + }, + { field => 'typenum', + type => 'select-table', + table => 'circuit_type', + name_col => 'typename', + }, + { field => 'termnum', + type => 'select-table', + table => 'circuit_termination', + name_col => 'termination', + }, + qw( vendor_qual_id vendor_order_id vendor_order_type vendor_order_status ), + { field => 'desired_due_date', type => 'date' }, + { field => 'due_date', type => 'date' }, + 'endpoint_ip_addr', + { field => 'endpoint_mac_addr', type => 'mac_addr' }, +); + + +my %labels = ( + circuit_id => 'Circuit ID', + providernum => 'Provider', + typenum => 'Circuit type', + termnum => 'Termination', + vendor_qual_id => 'Qualification ID', + vendor_order_id => 'Order ID', + vendor_order_type => 'Order type', + vendor_order_status => 'Order status', + desired_due_date => 'Desired due date', + due_date => 'Due date', + endpoint_ip_addr => 'Endpoint IP address', + endpoint_mac_addr => 'MAC address', +); + +my $self = $m->request_comp; + diff --git a/httemplate/view/svc_circuit.html b/httemplate/view/svc_circuit.html deleted file mode 100644 index 579ef5150..000000000 --- a/httemplate/view/svc_circuit.html +++ /dev/null @@ -1,81 +0,0 @@ -<& elements/svc_Common.html, - 'table' => 'svc_circuit', - 'labels' => \%labels, - 'fields' => \@fields, - 'html_foot' => sub { $self->call_method('.foot', @_) }, - 'edit_url' => $fsurl.'edit/svc_circuit.html?', -&> -<%method .foot> -% my $svc_circuit = shift; -% my $link = [ 'svc_phone.cgi?', 'svcnum' ]; -% if ( FS::svc_phone->count('circuit_svcnum = '.$svc_circuit->svcnum) ) { -<& /search/elements/search.html, - - 'title' => 'Provisioned phone services', - 'name_singular' => 'phone number', - 'query' => { 'table' => 'svc_phone', - 'hashref' => { 'circuit_svcnum' => $svc_circuit->svcnum }, - 'addl_from' => ' LEFT JOIN cust_svc USING (svcnum)'. - ' LEFT JOIN part_svc USING (svcpart)', - 'select' => 'svc_phone.*, part_svc.*', - }, - 'count_query' => 'SELECT COUNT(*) FROM svc_phone WHERE circuit_svcnum = '. - $svc_circuit->svcnum, - 'header' => [ '#', 'Service', 'Phone number', ], - 'fields' => [ 'svcnum', 'svc', 'phonenum' ], - 'links' => [ $link, $link, $link ], - 'align' => 'rlr', - - 'html_form' => 'Phone services', - 'nohtmlheader' => 1, - 'disable_total' => 1, - 'disable_maxselect' => 1, - 'really_disable_download' => 1, -&> -
-% } - -<%init> - -my @fields = ( - 'circuit_id', - { field => 'providernum', - type => 'select-table', - table => 'circuit_provider', - name_col => 'provider', - }, - { field => 'typenum', - type => 'select-table', - table => 'circuit_type', - name_col => 'typename', - }, - { field => 'termnum', - type => 'select-table', - table => 'circuit_termination', - name_col => 'termination', - }, - qw( vendor_qual_id vendor_order_id vendor_order_type vendor_order_status ), - { field => 'desired_due_date', type => 'date' }, - { field => 'due_date', type => 'date' }, - 'endpoint_ip_addr', - { field => 'endpoint_mac_addr', type => 'mac_addr' }, -); - - -my %labels = ( - circuit_id => 'Circuit ID', - providernum => 'Provider', - typenum => 'Circuit type', - termnum => 'Termination', - vendor_qual_id => 'Qualification ID', - vendor_order_id => 'Order ID', - vendor_order_type => 'Order type', - vendor_order_status => 'Order status', - desired_due_date => 'Desired due date', - due_date => 'Due date', - endpoint_ip_addr => 'Endpoint IP address', - endpoint_mac_addr => 'MAC address', -); - -my $self = $m->request_comp; - diff --git a/httemplate/view/svc_phone.cgi b/httemplate/view/svc_phone.cgi index b71e094ad..ab69c4f6f 100644 --- a/httemplate/view/svc_phone.cgi +++ b/httemplate/view/svc_phone.cgi @@ -56,7 +56,7 @@ if ( $conf->exists('svc_phone-lnp') ) { $labels{circuit_label} = mt('Circuit'); push @fields, { field => 'circuit_label', - link => [ $p.'view/svc_circuit.html?', 'circuit_svcnum' ] + link => [ $p.'view/svc_circuit.cgi?', 'circuit_svcnum' ] }; push @fields, 'sip_server';