From dcac7611edf207157571ed190ce49a7e0ab466e4 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Fri, 1 Aug 2008 15:01:42 +0200 Subject: [PATCH] fix some whitespace issues with text feed --- .../index_text_projects_and_actions.rhtml | 1 - app/views/todos/_text_todo.rhtml | 48 +++++++++---------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/app/views/projects/index_text_projects_and_actions.rhtml b/app/views/projects/index_text_projects_and_actions.rhtml index d8877514..877b5207 100644 --- a/app/views/projects/index_text_projects_and_actions.rhtml +++ b/app/views/projects/index_text_projects_and_actions.rhtml @@ -2,5 +2,4 @@ <%= p.name.upcase -%> <% actions = p.todos.select { |t| t.active? } -%> <%= render :partial => "todos/text_todo", :collection => actions -%> - <% end -%> \ No newline at end of file diff --git a/app/views/todos/_text_todo.rhtml b/app/views/todos/_text_todo.rhtml index 2569c50a..87f3647f 100644 --- a/app/views/todos/_text_todo.rhtml +++ b/app/views/todos/_text_todo.rhtml @@ -1,24 +1,24 @@ -<% -todo = text_todo - -if (todo.starred?) - result_string = " * " -else - result_string = " - " -end - -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 + +if (todo.starred?) + result_string = " * " +else + result_string = " - " +end + +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 -%>