From e3ebb686e1ad6a51d44f6592b4a55703f38a1fe4 Mon Sep 17 00:00:00 2001 From: lukemelia Date: Wed, 28 Mar 2007 05:21:00 +0000 Subject: [PATCH] Removed unnecessary line breaks in text feeds. Set line breaks in view to unix. Fixes #472. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@489 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/views/contexts/_text_context.rhtml | 16 ++++---- tracks/app/views/todos/_text_todo.rhtml | 37 +++++++++---------- 2 files changed, 26 insertions(+), 27 deletions(-) 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 %>