diff --git a/tracks/app/views/contexts/_text_context.rhtml b/tracks/app/views/contexts/_text_context.rhtml index bfc5babb..104e357d 100644 --- a/tracks/app/views/contexts/_text_context.rhtml +++ b/tracks/app/views/contexts/_text_context.rhtml @@ -1,8 +1,8 @@ -<% -context = text_context -todos_in_context = todos.select { |t| t.context_id == context.id } -if todos_in_context.length > 0 - %> -<%= context.name.upcase %>: -<% end -%> -<%= render :partial => "todos/text_todo", :collection => todos_in_context -%> \ No newline at end of file +<% +context = text_context +todos_in_context = todos.select { |t| t.context_id == context.id } +if todos_in_context.length > 0 + %> +<%= context.name.upcase %>: +<% end -%> +<%= render :partial => "todos/text_todo", :collection => todos_in_context -%> diff --git a/tracks/app/views/todos/_text_todo.rhtml b/tracks/app/views/todos/_text_todo.rhtml index 4136d4a7..25e02560 100644 --- a/tracks/app/views/todos/_text_todo.rhtml +++ b/tracks/app/views/todos/_text_todo.rhtml @@ -1,19 +1,18 @@ -<% -todo = text_todo -result_string = '' -if (todo.completed?) && todo.completed_at - result_string << " [Completed: " + format_date(todo.completed_at) + "] " -end - -if todo.due - result_string << " [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 %> +<% +todo = text_todo +result_string = '' +if (todo.completed?) && todo.completed_at + result_string << " [Completed: " + format_date(todo.completed_at) + "] " +end + +if todo.due + result_string << " [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 %>