From 12f4cc4b100b849de3584d5d1a2376cebcd8729f Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 27 Jun 2011 07:11:01 +0000 Subject: self-service ticket priority and edit subject, #13199 --- .../FS-SelfService/cgi/ticket_summary.html | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 fs_selfservice/FS-SelfService/cgi/ticket_summary.html (limited to 'fs_selfservice/FS-SelfService/cgi/ticket_summary.html') diff --git a/fs_selfservice/FS-SelfService/cgi/ticket_summary.html b/fs_selfservice/FS-SelfService/cgi/ticket_summary.html new file mode 100644 index 000000000..0d1c5e99a --- /dev/null +++ b/fs_selfservice/FS-SelfService/cgi/ticket_summary.html @@ -0,0 +1,65 @@ + + + + +<%= +my $col1 = "ffffff"; +my $col2 = "dddddd"; +my $col = $col1; + +my $can_set_priority = + grep { exists($_->{'_selfservice_priority'}) } @tickets; +if ( $can_set_priority ) { + $OUT .= qq!! . + qq!! . + qq!!; +} +$date_format ||= '%Y-%m-%d'; +my $date_formatter = sub { + my $time = Date::Parse::str2time($_[0], 'GMT'); # RT internal dates are GMT + # exclude times within 24 hours of zero + ($time > 86400) ? Date::Format::time2str($date_format, $time) : '' +}; + +my @titles = ('#', qw(Subject Queue Status Created Due)); +push @titles, 'Estimated
Minutes'; +push @titles, 'Priority'; + +$OUT .= join("\n", map { "" } @titles) . ''; + +foreach my $ticket ( @tickets ) { + my $id = $ticket->{'id'}; + my $td = qq!' . $td . $link . $id . ''. +$td. $link . $ticket->{'subject'} . ''. +$td. $ticket->{'queue'} . ''. +$td. $ticket->{'status'} . ''. +$td. $date_formatter->($ticket->{'created'}) . ''. +$td. $date_formatter->($ticket->{'due'}) . ''. +qq!'. +qq!'; + if ( exists($ticket_error{$id}) ) { + # display error message compactly + $OUT .= ''; + } + } + else { + $OUT .= ($ticket->{'content'} || $ticket->{'priority'}) . ''; + } + $OUT .= ''; + $col = $col eq $col1 ? $col2 : $col1; +} #foreach my $ticket +if ( $can_set_priority ) { + $OUT .= ''; +} +%> +
Open Tickets
$_
!; + my $link = qq!!; + $OUT .= '
!. ($ticket->{'timeestimated'} || '') +. '!; + if ( $can_set_priority ) { + $OUT .= '' . + '*
+
-- cgit v1.2.1