X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Ftickets.html;h=65cdcbfa7a50502894acc43d10537f6b382ceb16;hp=93cb51f25734458bebe2a9af52bf6714ab4e56e7;hb=3ce7691203a7737406bf2d4442f7fd84b81f847e;hpb=15e561850b61b10a92a46d8f3e316d53d4970087 diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html index 93cb51f25..65cdcbfa7 100644 --- a/httemplate/view/cust_main/tickets.html +++ b/httemplate/view/cust_main/tickets.html @@ -1,43 +1,44 @@ -<% - my( $cust_main ) = @_; +% +% my( $cust_main ) = @_; +% +% my $conf = new FS::Conf; +% my $num = $conf->config('cust_main-max_tickets') || 10; +% +% my @tickets = (); +% unless ( $conf->config('ticket_system-custom_priority_field') ) { +% +% @tickets = +% @{ FS::TicketSystem->customer_tickets($cust_main->custnum, $num) }; +% +% } else { +% +% foreach my $priority ( +% $conf->config('ticket_system-custom_priority_field-values'), '' +% ) { +% last if scalar(@tickets) >= $num; +% push @tickets, +% @{ FS::TicketSystem->customer_tickets( $cust_main->custnum, +% $num - scalar(@tickets), +% $priority, +% ) +% }; +% } +% +% } +% +% - my $conf = new FS::Conf; - my $num = $conf->config('cust_main-max_tickets') || 10; - - my @tickets = (); - unless ( $conf->config('ticket_system-custom_priority_field') ) { - - @tickets = - @{ FS::TicketSystem->customer_tickets($cust_main->custnum, $num) }; - - } else { - - foreach my $priority ( - $conf->config('ticket_system-custom_priority_field-values'), '' - ) { - last if scalar(@tickets) >= $num; - push @tickets, - @{ FS::TicketSystem->customer_tickets( $cust_main->custnum, - $num - scalar(@tickets), - $priority, - ) - }; - } - - } - -%> Highest priority tickets -(View all tickets for this customer) -(New ticket for this customer) +(View all tickets for this customer) +(New ticket for this customer) -<%= include("/elements/table-grid.html") %> +<% include("/elements/table-grid.html") %> +% my $bgcolor1 = '#eeeeee'; +% my $bgcolor2 = '#ffffff'; +% my $bgcolor = ''; +% -<% my $bgcolor1 = '#eeeeee'; - my $bgcolor2 = '#ffffff'; - my $bgcolor = ''; -%> # @@ -46,31 +47,31 @@ Highest priority tickets Queue Status +% foreach my $ticket ( @tickets ) { +% my $href = FS::TicketSystem->href_ticket($ticket->{id}); +% if ( $bgcolor eq $bgcolor1 ) { +% $bgcolor = $bgcolor2; +% } else { +% $bgcolor = $bgcolor1; +% } +% -<% foreach my $ticket ( @tickets ) { - my $href = FS::TicketSystem->href_ticket($ticket->{id}); - if ( $bgcolor eq $bgcolor1 ) { - $bgcolor = $bgcolor2; - } else { - $bgcolor = $bgcolor1; - } -%> - ><%= $ticket->{id} %> + ><% $ticket->{id} %> - ><%= $ticket->{subject} %> + ><% $ticket->{subject} %> - <%= $ticket->{content} || $ticket->{priority} %> + <% $ticket->{content} || $ticket->{priority} %> - <%= $ticket->{name} %> + <% $ticket->{name} %> - <%= $ticket->{status} %> + <% $ticket->{status} %> +% } -<% } %>