diff options
author | ivan <ivan> | 2006-07-25 08:33:46 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-07-25 08:33:46 +0000 |
commit | a0732f52fdcc2bca7c399d1249ccceb191de51cd (patch) | |
tree | 9b8d3af4ea844cd9dfa448772b30bed5e1e99b42 /httemplate/browse | |
parent | 4f056133e2a2bd84d8d789acf24aba695a6e3688 (diff) |
this should finish adding the "inactive" status, i think?
Diffstat (limited to 'httemplate/browse')
-rwxr-xr-x | httemplate/browse/agent.cgi | 114 |
1 files changed, 86 insertions, 28 deletions
diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi index 17cc8bd40..f5157d9b7 100755 --- a/httemplate/browse/agent.cgi +++ b/httemplate/browse/agent.cgi @@ -29,21 +29,27 @@ full offerings (via their type).<BR><BR> %> <% } %> -<%= table() %> +<%= include('/elements/table-grid.html') %> + +<% my $bgcolor1 = '#eeeeee'; + my $bgcolor2 = '#ffffff'; + my $bgcolor = ''; +%> + <TR> - <TH COLSPAN=<%= ( $cgi->param('showdisabled') || !dbdef->table('agent')->column('disabled') ) ? 2 : 3 %>>Agent</TH> - <TH>Type</TH> - <TH>Customers</TH> - <TH><FONT SIZE=-1>Customer<BR>packages</FONT></TH> - <TH>Reports</TH> - <TH>Registration codes</TH> - <TH>Prepaid cards</TH> + <TH CLASS="grid" BGCOLOR="#cccccc" COLSPAN=<%= ( $cgi->param('showdisabled') || !dbdef->table('agent')->column('disabled') ) ? 2 : 3 %>>Agent</TH> + <TH CLASS="grid" BGCOLOR="#cccccc">Type</TH> + <TH CLASS="grid" BGCOLOR="#cccccc">Customers</TH> + <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Customer<BR>packages</FONT></TH> + <TH CLASS="grid" BGCOLOR="#cccccc">Reports</TH> + <TH CLASS="grid" BGCOLOR="#cccccc">Registration codes</TH> + <TH CLASS="grid" BGCOLOR="#cccccc">Prepaid cards</TH> <% if ( $conf->config('ticket_system') ) { %> - <TH>Ticketing</TH> + <TH CLASS="grid" BGCOLOR="#cccccc">Ticketing</TH> <% } %> - <TH><FONT SIZE=-1>Payment Gateway Overrides</FONT></TH> - <TH><FONT SIZE=-1>Freq.</FONT></TH> - <TH><FONT SIZE=-1>Prog.</FONT></TH> + <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Payment Gateway Overrides</FONT></TH> + <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Freq.</FONT></TH> + <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Prog.</FONT></TH> </TR> <% # <TH><FONT SIZE=-1>Agent #</FONT></TH> @@ -58,107 +64,157 @@ foreach my $agent ( sort { 'agentnum='. $agent->agentnum; my $cust_pkg_link = $p. 'search/cust_pkg.cgi?agentnum='. $agent->agentnum; + + if ( $bgcolor eq $bgcolor1 ) { + $bgcolor = $bgcolor2; + } else { + $bgcolor = $bgcolor1; + } %> <TR> - <TD><A HREF="<%=$p%>edit/agent.cgi?<%= $agent->agentnum %>"> + <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"><A HREF="<%=$p%>edit/agent.cgi?<%= $agent->agentnum %>"> <%= $agent->agentnum %></A></TD> <% if ( dbdef->table('agent')->column('disabled') && !$cgi->param('showdisabled') ) { %> - <TD><%= $agent->disabled ? 'DISABLED' : '' %></TD> + <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"><%= $agent->disabled ? 'DISABLED' : '' %></TD> <% } %> - <TD><A HREF="<%=$p%>edit/agent.cgi?<%= $agent->agentnum %>"> + <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"><A HREF="<%=$p%>edit/agent.cgi?<%= $agent->agentnum %>"> <%= $agent->agent %></A></TD> - <TD><A HREF="<%=$p%>edit/agent_type.cgi?<%= $agent->typenum %>"><%= $agent->agent_type->atype %></A></TD> + <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"><A HREF="<%=$p%>edit/agent_type.cgi?<%= $agent->typenum %>"><%= $agent->agent_type->atype %></A></TD> + + <TD CLASS="inv" BGCOLOR="<%= $bgcolor %>"> + <TABLE CLASS="inv" CELLSPACING=0 CELLPADDING=0> - <TD> - <TABLE CELLSPACING=0 CELLPADDING=0> <TR> <TH ALIGN="right" WIDTH="40%"> - <%= my $num_prospect = $agent->num_prospect_cust_main %> + <FONT COLOR="#7e0079"> + <%= my $num_prospect = $agent->num_prospect_cust_main %> + </FONT> </TH> + <TD> <% if ( $num_prospect ) { %> <A HREF="<%= $cust_main_link %>&prospect=1"><% } %>prospects<% if ($num_prospect ) { %></A><% } %> <TD> </TR> + + <TR> + <TH ALIGN="right" WIDTH="40%"> + <FONT COLOR="#0000CC"> + <%= my $num_inactive = $agent->num_inactive_cust_main %> + </FONT> + </TH> + + <TD> + <% if ( $num_inactive ) { %> + <A HREF="<%= $cust_main_link %>&inactive=1"><% } %>inactive<% if ( $num_inactive ) { %></A><% } %> + </TD> + </TR> + <TR> <TH ALIGN="right" WIDTH="40%"> <FONT COLOR="#00CC00"> <%= my $num_active = $agent->num_active_cust_main %> </FONT> </TH> + <TD> <% if ( $num_active ) { %> <A HREF="<%= $cust_main_link %>&active=1"><% } %>active<% if ( $num_active ) { %></A><% } %> </TD> </TR> + <TR> <TH ALIGN="right" WIDTH="40%"> <FONT COLOR="#FF9900"> <%= my $num_susp = $agent->num_susp_cust_main %> </FONT> </TH> + <TD> <% if ( $num_susp ) { %> <A HREF="<%= $cust_main_link %>&suspended=1"><% } %>suspended<% if ( $num_susp ) { %></A><% } %> </TD> </TR> + <TR> <TH ALIGN="right" WIDTH="40%"> <FONT COLOR="#FF0000"> <%= my $num_cancel = $agent->num_cancel_cust_main %> </FONT> </TH> + <TD> <% if ( $num_cancel ) { %> <A HREF="<%= $cust_main_link %>&showcancelledcustomers=1&cancelled=1"><% } %>cancelled<% if ( $num_cancel ) { %></A><% } %> </TD> </TR> + </TABLE> </TD> - <TD> - <TABLE CELLSPACING=0 CELLPADDING=0> + <TD CLASS="inv" BGCOLOR="<%= $bgcolor %>" VALIGN="bottom"> + <TABLE CLASS="inv" CELLSPACING=0 CELLPADDING=0> + + <TR> + <TH ALIGN="right" WIDTH="40%"> + <FONT COLOR="#0000CC"> + <%= my $num_inactive_pkg = $agent->num_inactive_cust_pkg %> + </FONT> + </TH> + + <TD> + <% if ( $num_inactive_pkg ) { %> + <A HREF="<%= $cust_pkg_link %>&magic=inactive"><% } %>inactive<% if ( $num_inactive_pkg ) { %></A><% } %> + </TD> + </TR> + <TR> <TH ALIGN="right" WIDTH="40%"> <FONT COLOR="#00CC00"> <%= my $num_active_pkg = $agent->num_active_cust_pkg %> </FONT> </TH> + <TD> <% if ( $num_active_pkg ) { %> <A HREF="<%= $cust_pkg_link %>&magic=active"><% } %>active<% if ( $num_active_pkg ) { %></A><% } %> </TD> </TR> + <TR> <TH ALIGN="right" WIDTH="40%"> <FONT COLOR="#FF9900"> <%= my $num_susp_pkg = $agent->num_susp_cust_pkg %> </FONT> + </TH> <TD> <% if ( $num_susp_pkg ) { %> <A HREF="<%= $cust_pkg_link %>&magic=suspended"><% } %>suspended<% if ( $num_susp_pkg ) { %></A><% } %> </TD> </TR> + <TR> <TH ALIGN="right" WIDTH="40%"> <FONT COLOR="#FF0000"> <%= my $num_cancel_pkg = $agent->num_cancel_cust_pkg %> </FONT> </TH> + <TD> <% if ( $num_cancel_pkg ) { %> <A HREF="<%= $cust_pkg_link %>&magic=cancelled"><% } %>cancelled<% if ( $num_cancel_pkg ) { %></A><% } %> </TD> </TR> + </TABLE> </TD> - <TD> + <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"> <A HREF="<%= $p %>search/report_cust_pay.html?agentnum=<%= $agent->agentnum %>">Payments</A> <BR><A HREF="<%= $p %>search/report_cust_credit.html?agentnum=<%= $agent->agentnum %>">Credits</A> <BR><A HREF="<%= $p %>search/report_receivables.cgi?agentnum=<%= $agent->agentnum %>">A/R Aging</A> @@ -166,14 +222,14 @@ foreach my $agent ( sort { </TD> - <TD> + <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"> <%= my $num_reg_code = $agent->num_reg_code %> <% if ( $num_reg_code ) { %> <A HREF="<%=$p%>search/reg_code.html?agentnum=<%= $agent->agentnum %>"><% } %>Unused<% if ( $num_reg_code ) { %></A><% } %> <BR><A HREF="<%=$p%>edit/reg_code.cgi?agentnum=<%= $agent->agentnum %>">Generate codes</A> </TD> - <TD> + <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"> <%= my $num_prepay_credit = $agent->num_prepay_credit %> <% if ( $num_prepay_credit ) { %> <A HREF="<%=$p%>search/prepay_credit.html?agentnum=<%= $agent->agentnum %>"><% } %>Unused<% if ( $num_prepay_credit ) { %></A><% } %> @@ -182,7 +238,7 @@ foreach my $agent ( sort { <% if ( $conf->config('ticket_system') ) { %> - <TD> + <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"> <% if ( $agent->ticketing_queueid ) { %> Queue: <%= $agent->ticketing_queueid %>: <%= $agent->ticketing_queue %><BR> <% } %> @@ -190,7 +246,7 @@ foreach my $agent ( sort { <% } %> - <TD> + <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"> <TABLE CELLSPACING=0 CELLPADDING=0> <% foreach my $override ( # sort { } want taxclass-full stuff first? and default cards (empty cardtype) @@ -214,8 +270,10 @@ foreach my $agent ( sort { </TABLE> </TD> - <TD><%= $agent->freq %></TD> - <TD><%= $agent->prog %></TD> +<!-- + <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"><%= $agent->freq %></TD> + <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"><%= $agent->prog %></TD> +--> </TR> |