From 7f4929808c0c975197320b64436bace143804c96 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Tue, 31 Mar 2009 22:11:37 +0200 Subject: [PATCH] fix crlf issue --- app/views/contexts/_text_context.rhtml | 12 +++--- app/views/todos/index.ics.erb | 58 +++++++++++++------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/app/views/contexts/_text_context.rhtml b/app/views/contexts/_text_context.rhtml index f857f1d2..6a4a3a22 100644 --- a/app/views/contexts/_text_context.rhtml +++ b/app/views/contexts/_text_context.rhtml @@ -1,7 +1,7 @@ -<% -context = text_context -todos_in_context = todos.select { |t| t.context_id == context.id } -if todos_in_context.length > 0 --%> <%= context.name.upcase %>: -<%= render :partial => "todos/text_todo", :collection => todos_in_context -%> +<% +context = text_context +todos_in_context = todos.select { |t| t.context_id == context.id } +if todos_in_context.length > 0 +-%> <%= context.name.upcase %>: +<%= render :partial => "todos/text_todo", :collection => todos_in_context -%> <% end -%> \ No newline at end of file diff --git a/app/views/todos/index.ics.erb b/app/views/todos/index.ics.erb index b5fd9ec3..7d90b64a 100644 --- a/app/views/todos/index.ics.erb +++ b/app/views/todos/index.ics.erb @@ -1,30 +1,30 @@ -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//rousette.org.uk//Tracks 1.04//EN -CALSCALE:GREGORIAN -METHOD:PUBLISH -BEGIN:VTIMEZONE -TZID:<%= ENV['TZ'] || 'GMT' %> -LAST-MODIFIED:<%= Time.now.strftime("%Y%m%dT%H%M%SZ") %> -TZNAME:<%= ENV['TZ'] %> -END:VTIMEZONE -<% for @todo in @todos -%> -BEGIN:VTODO -DTSTAMP:<%= @todo.created_at.strftime("%Y%m%dT%H%M%SZ") %> -DTSTART;VALUE=DATE:<%= @todo.created_at.strftime("%Y%m%d") %> -SUMMARY:<%= @todo.description %> -UID:<%= todo_url(@todo) %> -<% if @todo.notes? -%> -DESCRIPTION:<%= format_ical_notes(@todo.notes) %> -<% end -%> -<% if @todo.due -%> -DUE;VALUE=DATE:<%= @todo.due.strftime("%Y%m%d") %> -<% end -%> -<% if @todo.project_id -%> -URL:<%= project_url(@todo.project) %> -<% else -%> -URL:<%= context_url(@todo.context) %> -<% end -%> -END:VTODO -<% end -%> +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//rousette.org.uk//Tracks 1.04//EN +CALSCALE:GREGORIAN +METHOD:PUBLISH +BEGIN:VTIMEZONE +TZID:<%= ENV['TZ'] || 'GMT' %> +LAST-MODIFIED:<%= Time.now.strftime("%Y%m%dT%H%M%SZ") %> +TZNAME:<%= ENV['TZ'] %> +END:VTIMEZONE +<% for @todo in @todos -%> +BEGIN:VTODO +DTSTAMP:<%= @todo.created_at.strftime("%Y%m%dT%H%M%SZ") %> +DTSTART;VALUE=DATE:<%= @todo.created_at.strftime("%Y%m%d") %> +SUMMARY:<%= @todo.description %> +UID:<%= todo_url(@todo) %> +<% if @todo.notes? -%> +DESCRIPTION:<%= format_ical_notes(@todo.notes) %> +<% end -%> +<% if @todo.due -%> +DUE;VALUE=DATE:<%= @todo.due.strftime("%Y%m%d") %> +<% end -%> +<% if @todo.project_id -%> +URL:<%= project_url(@todo.project) %> +<% else -%> +URL:<%= context_url(@todo.context) %> +<% end -%> +END:VTODO +<% end -%> END:VCALENDAR \ No newline at end of file