rename view/svc_circuit.html to fix links from package reports, #37420
authorMark Wells <mark@freeside.biz>
Tue, 4 Aug 2015 20:03:48 +0000 (13:03 -0700)
committerMark Wells <mark@freeside.biz>
Tue, 4 Aug 2015 20:03:58 +0000 (13:03 -0700)
httemplate/edit/process/svc_circuit.html
httemplate/search/svc_circuit.cgi [changed mode: 0755->0644]
httemplate/view/svc_circuit.cgi [new file with mode: 0644]
httemplate/view/svc_circuit.html [deleted file]
httemplate/view/svc_phone.cgi

index 27f43db..06cd7e7 100644 (file)
@@ -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>
old mode 100755 (executable)
new mode 100644 (file)
index c14c55f..8f05e04
@@ -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' ];
 
 </%init>
diff --git a/httemplate/view/svc_circuit.cgi b/httemplate/view/svc_circuit.cgi
new file mode 100644 (file)
index 0000000..579ef51
--- /dev/null
@@ -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' => '<SPAN CLASS="fsinnerbox-title">Phone services</SPAN>',
+  'nohtmlheader' => 1,
+  'disable_total' => 1,
+  'disable_maxselect' => 1,
+  'really_disable_download' => 1,
+&>
+  <BR>
+% }
+</%method>
+<%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;
+</%init>
diff --git a/httemplate/view/svc_circuit.html b/httemplate/view/svc_circuit.html
deleted file mode 100644 (file)
index 579ef51..0000000
+++ /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' => '<SPAN CLASS="fsinnerbox-title">Phone services</SPAN>',
-  'nohtmlheader' => 1,
-  'disable_total' => 1,
-  'disable_maxselect' => 1,
-  'really_disable_download' => 1,
-&>
-  <BR>
-% }
-</%method>
-<%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;
-</%init>
index b71e094..ab69c4f 100644 (file)
@@ -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';