X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Ftickets.html;h=e1f9a131e745cb05e6e2ca74aae84606603eb560;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=65cdcbfa7a50502894acc43d10537f6b382ceb16;hpb=3ce7691203a7737406bf2d4442f7fd84b81f847e;p=freeside.git diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html index 65cdcbfa7..e1f9a131e 100644 --- a/httemplate/view/cust_main/tickets.html +++ b/httemplate/view/cust_main/tickets.html @@ -1,52 +1,39 @@ -% -% 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, -% ) -% }; -% } -% -% } -% -% - - -Highest priority tickets -(View all tickets for this customer) -(New ticket for this customer) +
+ +in queue + +% foreach my $param ( grep { $_ ne 'Queue' } keys %new_param ) { + +% } +
+
+ +(View <% $openlabel %> tickets for this customer) +(View resolved tickets for this customer) +

<% include("/elements/table-grid.html") %> % my $bgcolor1 = '#eeeeee'; % my $bgcolor2 = '#ffffff'; % my $bgcolor = ''; -% - # Subject - Priority - Queue Status + Queue + Owner + Priority + % foreach my $ticket ( @tickets ) { % my $href = FS::TicketSystem->href_ticket($ticket->{id}); % if ( $bgcolor eq $bgcolor1 ) { @@ -54,24 +41,62 @@ Highest priority tickets % } else { % $bgcolor = $bgcolor1; % } -% + + + + ><% $ticket->{id} %> + + + + ><% $ticket->{subject} %> + + + + <% $ticket->{status} %> + + + + <% $ticket->{queue} %> + + + + <% $ticket->{owner} %> + + + + <% $ticket->{content} + ? $ticket->{content}.' ('.$ticket->{priority}.')' + : $ticket->{priority} + %> + + + - +% } - ><% $ticket->{id} %> + - ><% $ticket->{subject} %> +<%init> - <% $ticket->{content} || $ticket->{priority} %> +my( $cust_main ) = @_; +my( @tickets ) = $cust_main->tickets; - <% $ticket->{name} %> +my $open_link = FS::TicketSystem->href_customer_tickets($cust_main->custnum); +my $openlabel = join('/', FS::TicketSystem->statuses ); - <% $ticket->{status} %> - - -% } +my $res_link = FS::TicketSystem->href_customer_tickets( + $cust_main->custnum, + { 'statuses' => [ 'resolved' ] } + ); +my( $new_base, %new_param ) = FS::TicketSystem->href_params_new_ticket( + $cust_main, + join(', ', $cust_main->invoicing_list_emailonly ) ); - +my $new_link = FS::TicketSystem->href_new_ticket( + $cust_main, + join(', ', $cust_main->invoicing_list_emailonly ) + ); +