><% $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;
if ( $ss_priority ) {
use sort 'stable';
no warnings 'uninitialized';
@tickets = sort {
($b->{'content'} eq $a->{'content'}) &&
$b->{'_selfservice_priority'} <=> $a->{'_selfservice_priority'}
} @tickets;
}
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) : '';
};
%init>