Commit f170ce08 authored by Alex Vandiver's avatar Alex Vandiver
Browse files

Merge branch '4.2/overdue-class' into 4.2-trunk

parents 651c9c59 5a51e2ac
......@@ -237,7 +237,15 @@ $COLUMN_MAP = {
Due => {
title => 'Due', # loc
attribute => 'Due',
value => sub { return $_[0]->DueObj->AsString }
value => sub {
my $date = $_[0]->DueObj;
# Highlight the date if it was due in the past, and it's still active
if ( $date && $date->IsSet && $date->Diff < 0 && $_[0]->QueueObj->IsActiveStatus($_[0]->Status)) {
return (\'<span class="overdue">' , $date->AsString , \'</span>');
} else {
return $date->AsString;
}
}
},
Resolved => {
title => 'Resolved', # loc
......
......@@ -65,7 +65,7 @@
<tr class="date due">
<td class="label"><&|/l&>Due</&>:</td>\
% my $due = $Ticket->DueObj;
% if ( $due && $due->IsSet && $due->Diff < 0 ) {
% if ( $due && $due->IsSet && $due->Diff < 0 && $Ticket->QueueObj->IsActiveStatus($Ticket->Status) ) {
<td class="value"><span class="overdue"><% $due->AsString %></span></td>
% } else {
<td class="value"><% $due->AsString %></td>
......
......@@ -365,7 +365,7 @@ my $print_value = sub {
<div class="entry">
<div class="label date due"><&|/l&>Due</&>:</div>
% my $due = $Ticket->DueObj;
% if ( $due && $due->IsSet && $due->Diff < 0 ) {
% if ( $due && $due->IsSet && $due->Diff < 0 && $Ticket->QueueObj->IsActiveStatus($Ticket->Status) ) {
<div class="value date due"><span class="overdue"><% $due->AsString %></span></div>
% } else {
<div class="value date due"><% $due->AsString %></div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment