From cace6fef1d121d43d76166851aaa30c6c15857e5 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sun, 29 Apr 2012 20:38:20 -0700 Subject: self-service small_custview obeys selfservice-box_color and selfservice-text_color now, RT#17534 --- fs_selfservice/FS-SelfService/cgi/myaccount.html | 18 +++--- .../FS-SelfService/cgi/small_custview.html | 69 ++++++++++++++++++++++ .../FS-SelfService/cgi/ticket_summary.html | 26 ++++---- 3 files changed, 95 insertions(+), 18 deletions(-) create mode 100644 fs_selfservice/FS-SelfService/cgi/small_custview.html (limited to 'fs_selfservice') diff --git a/fs_selfservice/FS-SelfService/cgi/myaccount.html b/fs_selfservice/FS-SelfService/cgi/myaccount.html index d27f688..5370f7c 100644 --- a/fs_selfservice/FS-SelfService/cgi/myaccount.html +++ b/fs_selfservice/FS-SelfService/cgi/myaccount.html @@ -2,7 +2,9 @@ <%= include('header', 'My Account') %> Hello <%= $name %>!

-<%= $small_custview %> + +<%= include('small_custview') %> +
<%= if ( $access_pkgnum ) { $OUT .= qq!Balance: \$$balance

!; @@ -34,17 +36,17 @@ Hello <%= $name %>!

$OUT .= ''. ''; my $link = qq!!; + my $td = qq!$td${a}Invoice #". $invoice->{'invnum'}. "$td". "$td$a". $invoice->{'date'}. "$td". - qq!'. ''; $col = $col eq $col1 ? $col2 : $col1; @@ -61,12 +63,12 @@ Hello <%= $name %>!

''. ''. ''; - my $col1 = "ffffff"; - my $col2 = "dddddd"; + my $col1 = $stripe1_bgcolor || '#ffffff'; + my $col2 = $stripe2_bgcolor || '#dddddd'; my $col = $col1; foreach my $support ( @support_services ) { - my $td = qq!
Open Invoices
!; my $a=qq!'; $OUT .= "
$a\$!. $invoice->{'owed'}. + qq!$a\$!. $invoice->{'owed'}. '
Support Time Remaining
PackageTime Remaining
!; + my $td = qq!!; my $a = qq!'; $OUT .= diff --git a/fs_selfservice/FS-SelfService/cgi/small_custview.html b/fs_selfservice/FS-SelfService/cgi/small_custview.html new file mode 100644 index 0000000..8d6e073 --- /dev/null +++ b/fs_selfservice/FS-SelfService/cgi/small_custview.html @@ -0,0 +1,69 @@ +
+ +Customer #<%= $custnum %> + - <%= ucfirst($status)%> + + + + + +<%= if ( $has_ship_address ) { + + $OUT .= ''. + '
+ <%= $has_ship_address + ? 'Billing Address
' + : '' + %> + <%= $first %> <%= $last %>
+ <%= $company ? $company.'
' : '' %> + <%= $address1 %>
+ <%= $address2 ? $address2.'
' : '' %> + <%= $city %>, <%= $state %> <%= $zip %>
+ <%= $country && $country ne ($countrydefault||'US') + ? $country.'
' + : '' + %> + <%= if ( $daytime && $night ) { + $OUT .= "
Day Phone $daytime
Night Phone $night"; + } elsif ( $daytime || $night ) { + $OUT .= '
'. ($daytime || $night); + } + ''; + %> + <%= $fax ? "
Fax $fax" : '' %> + +
 '. + 'Service Address
'. + "$ship_first $ship_last
"; + $OUT .= "$ship_company
" if $ship_company; + $OUT .= "$ship_address1
"; + $OUT .= "$ship_address2
" if $ship_address2; + $OUT .= "$ship_city, $ship_state $ship_zip
"; + $OUT .= "$ship_country
" + if $ship_country && $ship_country ne ($countrydefault||'US'); + + + if ( $ship_daytime && $ship_night ) { + $OUT .= "
Day Phone $ship_daytime
Night Phone $ship_night"; + } elsif ( $ship_daytime || $ship_night ) { + $OUT .= ' + +
+ +<%= unless ( $access_pkgnum ) { + $OUT .= '
Balance: $'. $balance. '
'; + } + ''; +%> + +
+ diff --git a/fs_selfservice/FS-SelfService/cgi/ticket_summary.html b/fs_selfservice/FS-SelfService/cgi/ticket_summary.html index c840ca9..4333c4e 100644 --- a/fs_selfservice/FS-SelfService/cgi/ticket_summary.html +++ b/fs_selfservice/FS-SelfService/cgi/ticket_summary.html @@ -1,10 +1,10 @@ - + <%= -my $col1 = "ffffff"; -my $col2 = "dddddd"; +my $col1 = $stripe1_bgcolor || "#ffffff"; +my $col2 = $stripe2_bgcolor || "#dddddd"; my $col = $col1; my $can_set_priority = @@ -26,12 +26,15 @@ my @titles = ('#', qw(Subject Queue Status Created Due)); push @titles, 'Estimated
Hours'; push @titles, 'Priority'; -$OUT .= join("\n", map { "" } @titles) +$box_bgcolor ||= '#c0c0c0'; +my $th = qq($th> " } @titles) . ''; foreach my $ticket ( @tickets ) { my $id = $ticket->{'id'}; - my $td = qq!'; my $link = qq!!; $OUT .= '' . @@ -41,31 +44,34 @@ $td. $ticket->{'queue'} . ''. $space . $td. $ticket->{'status'} . ''. $space . $td. $date_formatter->($ticket->{'created'}) . ''. $space . $td. $date_formatter->($ticket->{'due'}) . ''. $space . -qq!'. $space . -qq!'; if ( exists($ticket_error{$id}) ) { # display error message compactly - $OUT .= ''; + } else { + $OUT .= $td.''; } } else { - $OUT .= ($ticket->{'content'} || $ticket->{'priority'}) . ''; + $OUT .= ($ticket->{'content'} || $ticket->{'priority'}) . ''. + $td.''; } $OUT .= ''; $col = $col eq $col1 ? $col2 : $col1; } #foreach my $ticket if ( $can_set_priority ) { - $OUT .= ''; } %> -- cgit v1.1
Open Tickets
Open Tickets
$_ $_
!; + my $td = qq!!; my $space = $td.' 
!. +qq!!. ($ticket->{'timeestimated'} ? sprintf('%.1f', $ticket->{'timeestimated'} / 60.0) # .1f? : '' ) . '!; +qq!!; if ( $can_set_priority ) { $OUT .= '' . '*
+ $OUT .= '