X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Ftickets.html;h=f076fcc927afc306f160561bd02943058f87b3db;hb=HEAD;hp=e0262b89538416fdfbb72255508fef8aec402664;hpb=61a65ecdb3fa33392a258df1e38fc9a37d750b52;p=freeside.git diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html index e0262b895..f076fcc92 100644 --- a/httemplate/view/cust_main/tickets.html +++ b/httemplate/view/cust_main/tickets.html @@ -1,144 +1,2 @@ -
- -<% mt('Create new ticket') |h %> - <% mt('in queue') |h %> -%# fetch list of queues in which the user can create tickets -% my %queues = FS::TicketSystem->queues('', 'CreateTicket'); -% if( $conf->exists('ticket_system-force_default_queueid') ) { -<% $queues{$new_param{'Queue'}} %> - -% } -% else { - - -% } -
-
- -(<% mt("View $openlabel tickets for this customer") |h %>) -(<% mt('View resolved tickets for this customer') |h %>) -

- -<& /elements/table-grid.html &> -% my $bgcolor1 = '#eeeeee'; -% my $bgcolor2 = '#ffffff'; -% my $bgcolor = ''; - - - <% mt('#') |h %> - <% mt('Subject') |h %> - <% mt('Status') |h %> - <% mt('Queue') |h %> - <% mt('Owner') |h %> - <% mt('Due') |h %> - <% mt('Estimated Time') |h %> - <% mt('Priority') |h %> -% if ( $ss_priority ) { - <% mt('Customer Priority') |h %> -% } - - -% foreach my $ticket ( @tickets ) { -% my $href = FS::TicketSystem->href_ticket($ticket->{id}); -% if ( $bgcolor eq $bgcolor1 ) { -% $bgcolor = $bgcolor2; -% } else { -% $bgcolor = $bgcolor1; -% } - - - - - ><% $ticket->{id} %> - - - - ><% $ticket->{subject} %> - - - - <% $ticket->{status} %> - - - - <% $ticket->{queue} %> - - - - <% $ticket->{owner} %> - - - - <% $date_formatter->($ticket->{due}) %> - - - - <% $ticket->{timeestimated} %> - - - - <% $ticket->{content} - ? $ticket->{content}.' ('.$ticket->{priority}.')' - : $ticket->{priority} - %> - - -% if ( $ss_priority ) { - - <% $ticket->{"CF.{$ss_priority}"} %> - -% } - - - -% } - - - -<%init> -use Date::Format 'time2str'; -use Date::Parse 'str2time'; - -my( $conf ) = new FS::Conf; -my( $cust_main ) = @_; -my( @tickets ) = $cust_main->tickets; - -my $open_link = FS::TicketSystem->href_customer_tickets($cust_main->custnum); -my $openlabel = join('/', FS::TicketSystem->statuses ); - -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 ); - -my $new_link = FS::TicketSystem->href_new_ticket( $cust_main ); - -my $ss_priority = FS::TicketSystem->selfservice_priority; - -my $format = $conf->config('date_format') || '%Y-%m-%d'; - -my $date_formatter = sub { - my $time = str2time($_[0], 'GMT'); - # exclude times within 24 hours of zero - ($time > 86400) ? time2str($format, $time) : ''; -}; - - +% my $cust_main = shift; +<& /elements/table-tickets.html, object => $cust_main &>