diff options
author | ivan <ivan> | 2008-08-22 03:01:06 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-08-22 03:01:06 +0000 |
commit | 106d0163556c31a3b2cf9c065ec6d9d6ded0ce64 (patch) | |
tree | eb945ad809a8bf524d8b20a9204f18aa24ecd6a7 /httemplate | |
parent | c1297541457bdfce910e7013cd6dc24254347852 (diff) |
the master control program has chosen YOU to serve your system on the game grid
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/elements/dashboard-toplist.html | 10 | ||||
-rw-r--r-- | httemplate/elements/mcp_lint.html | 37 |
2 files changed, 44 insertions, 3 deletions
diff --git a/httemplate/elements/dashboard-toplist.html b/httemplate/elements/dashboard-toplist.html index 7ee6f2d43..d8cd7f306 100644 --- a/httemplate/elements/dashboard-toplist.html +++ b/httemplate/elements/dashboard-toplist.html @@ -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 %>"> </TD> + <TD CLASS="grid" COLSPAN="<% scalar(@custom_priorities) + 4 %>" BGCOLOR="<% $bgcolor %>"> </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> % } diff --git a/httemplate/elements/mcp_lint.html b/httemplate/elements/mcp_lint.html new file mode 100644 index 000000000..826549c65 --- /dev/null +++ b/httemplate/elements/mcp_lint.html @@ -0,0 +1,37 @@ +% 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> |