From de7b8e329d482e9504fb7c0daa0b53025fa106fa Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Tue, 14 Jun 2011 09:01:08 +0200 Subject: [PATCH] the notes icon of todos was shown even if there was no note. fixed 8c168538b765ff71082c14106c9047929c442c54 --- app/views/todos/_mobile_todo.rhtml | 2 +- app/views/todos/_todo.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/todos/_mobile_todo.rhtml b/app/views/todos/_mobile_todo.rhtml index cd5d2e10..42f48efb 100644 --- a/app/views/todos/_mobile_todo.rhtml +++ b/app/views/todos/_mobile_todo.rhtml @@ -13,7 +13,7 @@ end -%> -%> <% end -%> <%= date_span -%> <%= link_to mobile_todo.description, todo_path(mobile_todo, :format => 'm') -%> -<% unless mobile_todo.notes.nil? %> +<% unless mobile_todo.notes.blank? %> <%= link_to(image_tag("mobile_notes.png", :border => "0"), mobile_todo_show_notes_path(mobile_todo, :format => 'm')) -%> <% end %> <% if parent_container_type == 'context' or parent_container_type == 'tag' -%> diff --git a/app/views/todos/_todo.html.erb b/app/views/todos/_todo.html.erb index e163fb26..3209ccc0 100644 --- a/app/views/todos/_todo.html.erb +++ b/app/views/todos/_todo.html.erb @@ -31,7 +31,7 @@ parameters += "&_tag_name=#{@tag_name}" if @source_view == 'tag' <%= tag_list(todo) %> <%= deferred_due_date(todo) %> <%= project_and_context_links( todo, parent_container_type, :suppress_context => suppress_context, :suppress_project => suppress_project ) %> - <%= collapsed_notes_image(todo) unless todo.notes.nil? %> + <%= collapsed_notes_image(todo) unless todo.notes.blank? %> <%= collapsed_successors_image(todo) unless todo.pending_successors.empty? %> @@ -39,4 +39,4 @@ parameters += "&_tag_name=#{@tag_name}" if @source_view == 'tag' <% #note: edit form will load here remotely -%>
- \ No newline at end of file +