summaryrefslogtreecommitdiff
path: root/app/views/dashboard
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-09-20 09:43:31 +0100
committerPhil Hughes <me@iamphill.com>2016-10-03 09:55:12 +0100
commit08b7480f51f6072ba70b8739301b1ba5d1df1213 (patch)
treea10766970512afbcc215f6faf83b34fb795e3bda /app/views/dashboard
parent77f7e666752c38776cc5e09d9ad87d3a291cf993 (diff)
downloadgitlab-ce-08b7480f51f6072ba70b8739301b1ba5d1df1213.tar.gz
Uses variable
Added red text if overdue
Diffstat (limited to 'app/views/dashboard')
-rw-r--r--app/views/dashboard/todos/_todo.html.haml6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/dashboard/todos/_todo.html.haml b/app/views/dashboard/todos/_todo.html.haml
index c729bbec5b5..06ea5675a0f 100644
--- a/app/views/dashboard/todos/_todo.html.haml
+++ b/app/views/dashboard/todos/_todo.html.haml
@@ -21,10 +21,12 @@
&middot; #{time_ago_with_tooltip(todo.created_at)}
- if todo.target.try(:due_date)
+ - is_due_today = todo.target.due_date.try(:today?)
+ - is_overdue = todo.target.try(:overdue?)
&middot;
- %span{ class: ('text-warning' if todo.target.due_date.try(:today?)) }
+ %span{ class: [('text-warning' if is_due_today), ('text-danger' if is_overdue)] }
Due
- - if todo.target.due_date.try(:today?)
+ - if is_due_today
today
- else
= todo.target.due_date.to_s(:medium)