2008-08-01 15:01:42 +02:00
|
|
|
<%
|
2011-09-27 01:07:02 +02:00
|
|
|
require 'htmlentities'
|
|
|
|
|
htmlentities = HTMLEntities.new
|
|
|
|
|
|
2008-08-01 15:01:42 +02:00
|
|
|
todo = text_todo
|
|
|
|
|
|
|
|
|
|
if (todo.starred?)
|
|
|
|
|
result_string = " * "
|
|
|
|
|
else
|
|
|
|
|
result_string = " - "
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if (todo.completed?) && todo.completed_at
|
2011-09-27 01:07:02 +02:00
|
|
|
result_string << "["+ htmlentities.decode(t('todos.completed')) +": " + format_date(todo.completed_at) + "] "
|
2008-08-01 15:01:42 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if todo.due
|
2011-09-27 01:07:02 +02:00
|
|
|
result_string << "[" + htmlentities.decode(t('todos.due')) + ": " + format_date(todo.due) + "] "
|
2008-08-01 15:01:42 +02:00
|
|
|
result_string << todo.description + " "
|
|
|
|
|
else
|
|
|
|
|
result_string << todo.description + " "
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
unless todo.project.nil?
|
|
|
|
|
result_string << "(" + todo.project.name + ")"
|
|
|
|
|
end
|
|
|
|
|
-%><%= result_string -%>
|
2008-08-04 09:16:01 +02:00
|
|
|
|