X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Ftickets.html;h=f076fcc927afc306f160561bd02943058f87b3db;hb=11bbf29de447fe39e9d7155fe280a0df70fa8c3c;hp=61c94d61f4864c5739130a6d546801e9f055b239;hpb=8d4abaa99403699aa5b5f02e899d2ea33980f913;p=freeside.git diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html index 61c94d61f..f076fcc92 100644 --- a/httemplate/view/cust_main/tickets.html +++ b/httemplate/view/cust_main/tickets.html @@ -1,54 +1,2 @@ -<% - my( $cust_main ) = @_; - - my $conf = new FS::Conf; - my $num = 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) -<%= table() %> - - # - Subject - Priority - Queue - Status - -<% foreach my $ticket ( @tickets ) { - my $href = FS::TicketSystem->href_ticket($ticket->{id}); -%> - - ><%= $ticket->{id} %> - ><%= $ticket->{subject} %> - <%= $ticket->{content} || $ticket->{priority} %> - <%= $ticket->{name} %> - <%= $ticket->{status} %> - -<% } %> - - +% my $cust_main = shift; +<& /elements/table-tickets.html, object => $cust_main &>