From 7a9a19a563510760ed43d69c09abfafcb6cf070b Mon Sep 17 00:00:00 2001 From: bsag Date: Sat, 15 Apr 2006 15:08:44 +0000 Subject: [PATCH] Changed the completed box on the home, context and project pages so that it presents the same format as that on the 'done' page: the actions context and project (if it has one) is presented in brackets after the description. Fixes #254. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@223 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/views/todo/_item.rhtml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tracks/app/views/todo/_item.rhtml b/tracks/app/views/todo/_item.rhtml index a0e33773..c2a6bc2f 100644 --- a/tracks/app/views/todo/_item.rhtml +++ b/tracks/app/views/todo/_item.rhtml @@ -11,11 +11,16 @@ <% else -%> <%= due_date( item.due ) -%> <% end -%> - <%= sanitize(item.description) %> -<% if @on_page == "project" -%> - <%= link_to( "[C]", { :controller => "context", :action => "show", :name => urlize(item.context.name) }, :title => "View context: #{item.context.name}" ) %> -<% elsif item.project_id -%> - <%= link_to( "[P]", { :controller => "project", :action => "show", :name => urlize(item.project.name) }, :title => "View project: #{item.project.name}" ) %> + +<%= sanitize(item.description) %> +<% if item.done? -%> + (<%= item.context.name %><%= ", " + item.project.name if item.project_id %>) +<% else -%> + <% if @on_page == "project" -%> + <%= link_to( "[C]", { :controller => "context", :action => "show", :name => urlize(item.context.name) }, :title => "View context: #{item.context.name}" ) %> + <% elsif item.project_id -%> + <%= link_to( "[P]", { :controller => "project", :action => "show", :name => urlize(item.project.name) }, :title => "View project: #{item.project.name}" ) %> + <% end -%> <% end -%> <% if item.notes? -%> <%= toggle_show_notes( item ) %>