[freeside-commits] freeside/httemplate/view/elements svc_Common.html, 1.8, 1.9

Ivan,,, ivan at wavetail.420.am
Wed Apr 15 00:14:13 PDT 2009


Update of /home/cvs/cvsroot/freeside/httemplate/view/elements
In directory wavetail.420.am:/tmp/cvs-serv10918/elements

Modified Files:
	svc_Common.html 
Log Message:
should fix view of unlinked phone numbers, RT#5171

Index: svc_Common.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/elements/svc_Common.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- svc_Common.html	8 Sep 2008 21:23:02 -0000	1.8
+++ svc_Common.html	15 Apr 2009 07:14:11 -0000	1.9
@@ -1,30 +1,40 @@
-%  # options example...
-%  #
-%  # 'table' => 'svc_something'
-%  #
-%  # 'labels' => {
-%  #               'column' => 'Label',
-%  #             },
-%  #
-%  # listref - each item is a literal column name (or method) or (notyet) coderef
-%  # if not specified all columns (except for the primary key) will be viewable
-%  # 'fields' => [
-%  #             ]
-%  #
-%  # # defaults to "edit/$table.cgi?", will have svcnum appended
-%  # 'edit_url' => 
-%
-%
-% if ( $custnum ) { 
+<%doc>
+
+#Example:
 
+  include( 'elements/svc_Common.html, 
+
+             'table' => 'svc_something'
+
+             'labels' => {
+                           'column' => 'Label',
+                         },
+
+             #listref - each item is a literal column name (or method) or
+             # (notyet) coderef.  if not specified all columns (except for the
+             #primary key) will be viewable
+             'fields' => [
+                         ]
+
+             # defaults to "edit/$table.cgi?", will have svcnum appended
+             'edit_url' => 
+         )
+
+</%doc>
+% if ( $custnum ) { 
 
   <% include("/elements/header.html","View $label: $value") %>
 
   <% include( '/elements/small_custview.html', $custnum, '', 1,
      "${p}view/cust_main.cgi") %>
   <BR>
+
 % } else { 
 
+  <% include("/elements/header.html","View $label: $value", menubar(
+      "Cancel this (unaudited) $label" =>
+            "javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')"
+  )) %>
 
   <SCRIPT>
   function areyousure(href) {
@@ -33,13 +43,8 @@
   }
   </SCRIPT>
 
-  <% include("/elements/header.html","View $label: $value", menubar(
-      "Cancel this (unaudited) $label" =>
-            "javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')"
-  )) %>
 % } 
 
-
 Service #<B><% $svcnum %></B>
 % my $url = $opt{'edit_url'} || $p. 'edit/'. $opt{'table'}. '.cgi?';
 | <A HREF="<%$url%><%$svcnum%>">Edit this <% $label %></A>
@@ -130,7 +135,9 @@
                  ' LEFT JOIN cust_pkg  USING ( pkgnum  ) '.
                  ' LEFT JOIN cust_main USING ( custnum ) ',
   'hashref'   => { 'svcnum' => $svcnum },
-  'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
+  'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql(
+                            'null_right' => 'View/link unlinked services'
+                          ),
 }) or die "Unknown svcnum $svcnum in ". $opt{'table'}. " table\n";
 
 my $cust_svc = $svc_x->cust_svc;



More information about the freeside-commits mailing list