tracks/app/views/todos/_todo.text.erb
2012-04-30 13:56:41 +02:00

26 lines
606 B
Text

<%
require 'htmlentities'
htmlentities = HTMLEntities.new
if (todo.starred?)
result_string = " * "
else
result_string = " - "
end
if (todo.completed?) && todo.completed_at
result_string << "["+ htmlentities.decode(t('todos.completed')) +": " + format_date(todo.completed_at) + "] "
end
if todo.due
result_string << "[" + htmlentities.decode(t('todos.due')) + ": " + format_date(todo.due) + "] "
result_string << todo.description + " "
else
result_string << todo.description + " "
end
unless todo.project.nil?
result_string << "(" + todo.project.name + ")"
end
-%><%= result_string -%>