From 381db782a061470e4b355d00eedc30f3274fdf09 Mon Sep 17 00:00:00 2001 From: Henrik Bohre Date: Fri, 22 May 2009 14:33:56 +0200 Subject: [PATCH] #300: Added pending items to tag view --- app/controllers/todos_controller.rb | 3 +++ app/views/todos/tag.html.erb | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index 71d22346..83207f76 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -433,6 +433,9 @@ class TodosController < ApplicationController @deferred = tag_collection.find(:all, :conditions => ['todos.user_id = ? and state = ?', current_user.id, 'deferred'], :order => 'show_from ASC, todos.created_at DESC') + @pending = tag_collection.find(:all, + :conditions => ['todos.user_id = ? and state = ?', current_user.id, 'pending'], + :order => 'show_from ASC, todos.created_at DESC') # If you've set no_completed to zero, the completed items box isn't shown on # the tag page diff --git a/app/views/todos/tag.html.erb b/app/views/todos/tag.html.erb index c6418da5..7804c9b9 100644 --- a/app/views/todos/tag.html.erb +++ b/app/views/todos/tag.html.erb @@ -8,7 +8,13 @@ :locals => { :collapsible => true } %> <% unless @deferred.nil? -%> - <%= render :partial => "todos/deferred", :locals => { :deferred => @deferred, :collapsible => true, :append_descriptor => "tagged with ‘#{@tag_name}’", :parent_container_type => 'tag' } %> + <%= render :partial => "todos/deferred", :locals => { + :deferred => @deferred, + :pending => @pending, + :collapsible => true, + :append_descriptor => "tagged with ‘#{@tag_name}’", + :parent_container_type => 'tag' + } %> <% end -%> <% unless @hidden_todos.nil? -%>