summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-10-03 10:08:34 +0100
committerPhil Hughes <me@iamphill.com>2016-10-03 10:08:34 +0100
commit06fdfc7395681ee6dca6f1b9d998cdbeb57b0a24 (patch)
tree551200fcf2f13f29c2ed8a1ba6791b1b73869696
parent8ea18c37611ccb86b286761cc373c01199d64878 (diff)
downloadgitlab-ce-06fdfc7395681ee6dca6f1b9d998cdbeb57b0a24.tar.gz
Moved middot into helper method
-rw-r--r--app/helpers/todos_helper.rb3
-rw-r--r--app/views/dashboard/todos/_todo.html.haml2
2 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb
index 9542d3d7941..3d2e079c380 100644
--- a/app/helpers/todos_helper.rb
+++ b/app/helpers/todos_helper.rb
@@ -120,7 +120,8 @@ module TodosHelper
is_due_today = todo.target.due_date.try(:today?)
is_overdue = todo.target.try(:overdue?)
- content_tag :span, class: [('text-warning' if is_due_today), ('text-danger' if is_overdue)] do
+ html = "&middot; ".html_safe
+ html << content_tag(:span, class: [('text-warning' if is_due_today), ('text-danger' if is_overdue)]) do
"Due #{is_due_today ? "today" : todo.target.due_date.to_s(:medium)}"
end
end
diff --git a/app/views/dashboard/todos/_todo.html.haml b/app/views/dashboard/todos/_todo.html.haml
index cc77388563f..cc077fad32a 100644
--- a/app/views/dashboard/todos/_todo.html.haml
+++ b/app/views/dashboard/todos/_todo.html.haml
@@ -19,7 +19,7 @@
(removed)
&middot; #{time_ago_with_tooltip(todo.created_at)}
- &middot; #{todo_due_date(todo)}
+ = todo_due_date(todo)
.todo-body
.todo-note