[freeside-commits] freeside/httemplate/view cust_main.cgi, 1.136, 1.137

Ivan,,, ivan at wavetail.420.am
Fri Dec 17 15:44:40 PST 2010


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

Modified Files:
	cust_main.cgi 
Log Message:
add cust_main-external_links and menu-prepend_links options for wisper NORM links, RT#10889

Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main.cgi,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -w -d -r1.136 -r1.137
--- cust_main.cgi	10 Dec 2010 06:02:53 -0000	1.136
+++ cust_main.cgi	17 Dec 2010 23:44:38 -0000	1.137
@@ -93,14 +93,28 @@
 
 <BR><BR>
 
+% my $br = 0;
 % if (    $curuser->access_right('Billing event reports') 
 %      || $curuser->access_right('View customer billing events')
 %    ) {
-
+% $br=1;
   <A HREF="<% $p %>search/cust_event.html?custnum=<% $custnum %>">View billing events for this customer</A>
-  <BR><BR>
+% }
+
+% if ( $conf->config('cust_main-external_links') ) {
+    <% $br++ ? ' | ' : '' %>
+%   my @links = split(/\n/, $conf->config('menu-prepend_links'));
+%   foreach my $link (@links) {
+%     $link =~ /^\s*(\S+)\s+(.*?)(\s*\(([^\)]*)\))?$/ or next;
+%     my($url, $label, $alt) = ($1, $2, $4);
+      <A HREF="<% $url.$custnum %>" ALT="<% $alt |h %>"><% $label |h %></A>
+%   }
+% }
 
+% if ( $br ) {
+  <BR><BR>
 % }
+</%doc>
 
 %my $signupurl = $conf->config('signupurl');
 %if ( $signupurl ) {



More information about the freeside-commits mailing list