#300: Added pending items to tag view

This commit is contained in:
Henrik Bohre 2009-05-22 14:33:56 +02:00 committed by Eric Allen
parent a02b2cc184
commit 381db782a0
2 changed files with 10 additions and 1 deletions

View file

@ -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

View file

@ -8,7 +8,13 @@
:locals => { :collapsible => true } %>
<% unless @deferred.nil? -%>
<%= render :partial => "todos/deferred", :locals => { :deferred => @deferred, :collapsible => true, :append_descriptor => "tagged with &lsquo;#{@tag_name}&rsquo;", :parent_container_type => 'tag' } %>
<%= render :partial => "todos/deferred", :locals => {
:deferred => @deferred,
:pending => @pending,
:collapsible => true,
:append_descriptor => "tagged with &lsquo;#{@tag_name}&rsquo;",
:parent_container_type => 'tag'
} %>
<% end -%>
<% unless @hidden_todos.nil? -%>