X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_referral.html;h=c7374673ff2d9cb175714db41759a7f1e302d911;hb=69d3ce315e8d44adef35eb32f805ceaa9b91598c;hp=21ee8736b6bd055626682a86410be4d5f0c9b8e6;hpb=9509e5bfb7f9331303153cac24d7bfecbe2ea9f1;p=freeside.git diff --git a/httemplate/browse/part_referral.html b/httemplate/browse/part_referral.html index 21ee8736b..c7374673f 100755 --- a/httemplate/browse/part_referral.html +++ b/httemplate/browse/part_referral.html @@ -6,6 +6,13 @@ Where a customer heard about your service. Tracked for informational purposes. Add a new advertising source

+<% $cgi->param('showdisabled') + ? do { $cgi->param('showdisabled', 0); + '( hide disabled advertising sources )'; } + : do { $cgi->param('showdisabled', 1); + '( show disabled advertising sources )'; } +%> + <% include('/elements/table-grid.html') %> % my $bgcolor1 = '#eeeeee'; % my $bgcolor2 = '#ffffff'; @@ -13,8 +20,12 @@ Where a customer heard about your service. Tracked for informational purposes. Advertising source -% if ( $show_agentnums ) { +% if ( ! $cgi->param('showdisabled') ) { + +% } + +% if ( $show_agentnums ) { Agent % } @@ -27,7 +38,7 @@ Where a customer heard about your service. Tracked for informational purposes. -%foreach my $part_referral ( FS::part_referral->all_part_referral(1) ) { +%foreach my $part_referral ( FS::part_referral->all_part_referral(1,!scalar($cgi->param('showdisabled'))) ) { % % if ( $bgcolor eq $bgcolor1 ) { % $bgcolor = $bgcolor2; @@ -55,6 +66,16 @@ Where a customer heard about your service. Tracked for informational purposes. % } <% $part_referral->referral %><% $a ? '' : '' %> + +% if ( ! $cgi->param('showdisabled') ) { + + <% $part_referral->disabled + ? 'DISABLED' + : 'Active' + %> + +% } + % if ( $show_agentnums ) { <% $part_referral->agentnum ? $part_referral->agent->agent : '(global)' %> @@ -73,11 +94,11 @@ Where a customer heard about your service. Tracked for informational purposes. - + - +
<% $num_cust %>customers customers 
<% $num_pkg %>packages packages 
@@ -94,7 +115,7 @@ Where a customer heard about your service. Tracked for informational purposes. % or die dbh->errstr; - Total + param('showdisabled') %>Total % for my $period ( keys %after ) { % my @param = ( $today-$after{$period}, % $today+$before{$period}, @@ -108,11 +129,11 @@ Where a customer heard about your service. Tracked for informational purposes. - + - +
<% $num_cust %>customers customers 
<% $num_pkg %>packages packages 
@@ -126,8 +147,7 @@ Where a customer heard about your service. Tracked for informational purposes. <%init> die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('Configuration') - || $FS::CurrentUser::CurrentUser->access_right('Edit advertising sources') + unless $FS::CurrentUser::CurrentUser->access_right('Edit advertising sources') || $FS::CurrentUser::CurrentUser->access_right('Edit global advertising sources'); my $today = timelocal(0, 0, 0, (localtime(time))[3..5] );