[freeside-commits] freeside/httemplate/elements dashboard-toplist.html, 1.4, 1.5 mcp_lint.html, NONE, 1.1

Ivan,,, ivan at wavetail.420.am
Thu Aug 21 20:01:09 PDT 2008


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

Modified Files:
	dashboard-toplist.html 
Added Files:
	mcp_lint.html 
Log Message:
the master control program has chosen YOU to serve your system on the game grid

--- NEW FILE: mcp_lint.html ---
% foreach my $lint (@lint) {
  <FONT COLOR="#FF0000"><% $lint %></FONT><BR>
% }

<%init>

my(%opt) = @_;

my $conf = new FS::Conf;

my @svc = ();
if ( $opt{svc} ) {
  @svc = ref($opt{svc}) ? @{ $opt{svc} } : ( $opt{svc} );
} elsif ( $opt{cust_main} ) {
  my $custnum = $opt{cust_main}->custnum;
  @svc = qsearchs({
           'table'     => 'cust_svc',
           'addl_from' => ' LEFT JOIN cust_pkg  USING ( pkgnum ) '.
                          ' LEFT JOIN cust_main USING ( custnum )',
           'hashref'   => { 'svcpart' => $conf->config('mcp_svcpart') },
           'extra_sql' => " AND custnum = $custnum ",
         });
} else {
  die 'neither svc nor cust_main options passed to mcp_lint';
}

my @lint = ();
foreach my $svc ( @svc ) {
  my @svc_lint = tron_lint($svc);
  if ( scalar(@svc) > 1 ) {
    push @lint, map $svc->title.": $_", @svc_lint;
  } else {
    push @lint, @svc_lint;
  }
}

</%init>

Index: dashboard-toplist.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/dashboard-toplist.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- dashboard-toplist.html	15 Dec 2006 20:55:31 -0000	1.4
+++ dashboard-toplist.html	22 Aug 2008 03:01:06 -0000	1.5
@@ -23,6 +23,9 @@
 	  <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
 	    <A HREF="view/cust_main.cgi?<% $custnum %>"><% $cust_main->name %></A>
 	  </TD>
+          <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
+            <% include('/elements/mcp_lint.html', 'cust_main'=>$cust_main) %>
+          </TD>
 	  <TD CLASS="grid" BGCOLOR="<% $bgcolor %>" ALIGN="right">
 	    <FONT SIZE="-1"><A HREF="<% FS::TicketSystem->href_new_ticket($cust_main, join(', ', grep { $_ !~ /^(POST|FAX)$/ } $cust_main->invoicing_list ) ) %>">(new ticket)</A></FONT>
 	  </TD>
@@ -55,7 +58,7 @@
 %   } elsif ( $line =~ /^\-\-+$/ ) { #divider
 %     
       <TR>
-        <TH CLASS="grid" COLSPAN="<% scalar(@custom_priorities) + 3 %>"></TH>
+        <TH CLASS="grid" COLSPAN="<% scalar(@custom_priorities) + 4 %>"></TH>
       </TR>
 
 %     next;
@@ -63,13 +66,14 @@
 %   } elsif ( $line =~ /^\s*$/ ) {
 
       <TR>
-        <TD CLASS="grid" COLSPAN="<% scalar(@custom_priorities) + 3 %>" BGCOLOR="<% $bgcolor %>">&nbsp;</TD>
+        <TD CLASS="grid" COLSPAN="<% scalar(@custom_priorities) + 4 %>" BGCOLOR="<% $bgcolor %>">&nbsp;</TD>
       </TR>
 
 %   } elsif ( $line =~ /^\S/ ) { #label line
 
       <TR>
         <TH CLASS="grid" BGCOLOR="#cccccc"><% $line %></TH>
+	<TH CLASS="grid" BGCOLOR="#cccccc">Lint</TH>
 	<TH CLASS="grid" BGCOLOR="#cccccc"></TH>
 %       foreach my $priority ( @custom_priorities, '' ) {
           <TH CLASS="grid" BGCOLOR="#cccccc">
@@ -81,7 +85,7 @@
 %   } else { #regular line
 
       <TR>
-        <TD CLASS="grid"  COLSPAN="<% scalar(@custom_priorities) + 3 %>" BGCOLOR="<% $bgcolor %>"><% $line %></TD>
+        <TD CLASS="grid"  COLSPAN="<% scalar(@custom_priorities) + 4 %>" BGCOLOR="<% $bgcolor %>"><% $line %></TD>
       </TR>
 
 %   }



More information about the freeside-commits mailing list