[Rt-commit] [svn] r1507 - in rt/branches/3.3-TESTING: . html/Elements/RT__Ticket

jesse at pallas.eruditorum.org jesse at pallas.eruditorum.org
Sun Sep 19 20:58:20 EDT 2004


Author: jesse
Date: Sun Sep 19 20:58:19 2004
New Revision: 1507

Modified:
   rt/branches/3.3-TESTING/   (props changed)
   rt/branches/3.3-TESTING/html/Elements/RT__Ticket/ColumnMap
Log:
 r10219 at tinbook (orig r1458):  leira | 2004-09-08T21:19:51.021183Z
 If something is overdue, set DueRelative to class "overdue".
 
 Note: core RT doesn't have an "overdue" class at this time.
 


Modified: rt/branches/3.3-TESTING/html/Elements/RT__Ticket/ColumnMap
==============================================================================
--- rt/branches/3.3-TESTING/html/Elements/RT__Ticket/ColumnMap	(original)
+++ rt/branches/3.3-TESTING/html/Elements/RT__Ticket/ColumnMap	Sun Sep 19 20:58:19 2004
@@ -200,7 +200,16 @@
     DueRelative => {
         title     => 'Due',
         attribute => 'Due',
-        value     => sub { return $_[0]->DueObj->AgeAsString }
+        value     => sub { 
+	    my $date = $_[0]->DueObj;
+	    my $now = new RT::Date($RT::SystemUser);
+	    $now->SetToNow();
+	    my $class;
+	    if ($date && $date->Unix > 0 && $date->Unix < $now->Unix) {
+		$class = 'overdue';
+	    }
+	    return '<span class="' . $class . '">' . $date->AgeAsString . '</span>';
+	}
     },
     ResolvedRelative => {
         title     => 'Resolved',


More information about the Rt-commit mailing list