X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ftable-tickets.html;h=c63a55e56327a9f923761823c18471f81cb39269;hp=6d1a45a0d9eac899ef46961e9de05b5692250549;hb=b97efa7ea7e8f10ea017f20a31ea48e7db8044e5;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500 diff --git a/httemplate/elements/table-tickets.html b/httemplate/elements/table-tickets.html index 6d1a45a0d..c63a55e56 100644 --- a/httemplate/elements/table-tickets.html +++ b/httemplate/elements/table-tickets.html @@ -11,6 +11,7 @@ View % my $bgcolor = ''; <TR> + <TH CLASS="grid" BGCOLOR="#cccccc"></TH> <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('#') |h %></TH> <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Subject') |h %></TH> <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Status') |h %></TH> @@ -37,12 +38,22 @@ View <TR> + <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"> +% if ( $ticket->{is_unreplied} ) { + <A CLASS="dot" STYLE="background-color: green" HREF=<%$href%>> +% } else { +% # placeholder + <A CLASS="dot" STYLE="visibility: hidden" HREF=<%$href%>> +% } + </A> + </TD> + <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"> <A HREF=<%$href%>><% $ticket->{id} %></A> </TD> <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"> - <A HREF=<%$href%>><% $ticket->{subject} %></A> + <A HREF=<%$href%>><% $ticket->{subject} |h %></A> </TD> <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"> @@ -54,7 +65,7 @@ View </TD> <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"> - <% $ticket->{owner} %> + <% $ticket->{owner} |h %> </TD> <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"> @@ -69,12 +80,13 @@ View <% $ticket->{content} ? $ticket->{content}.' ('.$ticket->{priority}.')' : $ticket->{priority} + |h %> </TD> % if ( $ss_priority ) { <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>"> - <% $ticket->{"CF.{$ss_priority}"} %> + <% $ticket->{"CF.{$ss_priority}"} |h %> </TD> % } % if ( $object->isa('FS::cust_main') ) { @@ -94,12 +106,12 @@ View </TABLE> <%init> -use Date::Parse qw(str2time); -use Date::Format qw(time2str); my %opt = @_; my $conf = new FS::Conf; +return '' unless $conf->config('ticket_system'); + my $object = $opt{'object'}; $object = $object->cust_svc if $object->isa('FS::svc_Common'); my( @tickets ) = $object->tickets; @@ -116,8 +128,10 @@ if ( $object->isa('FS::cust_main') ) { $object->custnum, { 'statuses' => [ 'resolved' ] } ); -} -elsif ( $object->isa('FS::cust_svc') ) { +} elsif ( $object->isa('FS::cust_svc') ) { + + return '' unless $object->pkgnum; + $thing = 'service'; $open_link = FS::TicketSystem->href_service_tickets($object->svcnum); @@ -151,7 +165,7 @@ if ( $ss_priority ) { my $format = $conf->config('date_format') || '%Y-%m-%d'; my $date_formatter = sub { - my $time = str2time($_[0], 'GMT'); + my $time = parse_datetime($_[0], 'GMT'); # exclude times within 24 hours of zero ($time > 86400) ? time2str($format, $time) : ''; };