diff --git a/app/controllers/recurring_todos_controller.rb b/app/controllers/recurring_todos_controller.rb index 7717dc83..763ed06b 100644 --- a/app/controllers/recurring_todos_controller.rb +++ b/app/controllers/recurring_todos_controller.rb @@ -11,6 +11,8 @@ class RecurringTodosController < ApplicationController @no_recurring_todos = @recurring_todos.size == 0 @no_completed_recurring_todos = @completed_recurring_todos.size == 0 @count = @recurring_todos.size + + @page_title = "TRACKS::Recurring Actions" end def new diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index e3b048cc..86d15f5a 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -333,18 +333,19 @@ class TodosController < ApplicationController @tag_name = params[:name] # mobile tags are routed with :name ending on .m. So we need to chomp it - if mobile? - @tag_name = @tag_name.chomp('.m') - end + @tag_name = @tag_name.chomp('.m') if mobile? @tag = Tag.find_by_name(@tag_name) - if @tag.nil? - @tag = Tag.new(:name => @tag_name) - end + @tag = Tag.new(:name => @tag_name) if @tag.nil? + tag_collection = @tag.todos @not_done_todos = tag_collection.find(:all, :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'active']) + @hidden_todos = current_user.todos.find(:all, + :include => [:taggings, :tags, :context], + :conditions => ['tags.name = ? AND (todos.state = ? OR (contexts.hide = ? AND todos.state = ?))', @tag_name, 'project_hidden', true, 'active']) + #@hidden_todos = tag_collection.find(:all, :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'project_hidden']) - @contexts = current_user.contexts.find(:all, :include => [ :todos ]) + @contexts = current_user.contexts.find(:all) @contexts_to_show = @contexts.reject {|x| x.hide? } @deferred = tag_collection.find(:all, :conditions => ['taggings.user_id = ? and state = ?', current_user.id, 'deferred']) diff --git a/app/views/todos/_deferred.rhtml b/app/views/todos/_deferred.rhtml index fff4a9e1..f059e1af 100644 --- a/app/views/todos/_deferred.rhtml +++ b/app/views/todos/_deferred.rhtml @@ -1,18 +1,17 @@ -<% suffix = append_descriptor ? append_descriptor : '' -%> -
-

- <% if collapsible %> - <%= image_tag("collapse.png") %> - <% end %> - Deferred actions <%= append_descriptor ? append_descriptor : '' %> -

- -
-
-

Currently there are no deferred actions

-
- - <%= render :partial => "todos/todo", :collection => deferred, :locals => { :parent_container_type => 'tickler' } %> - -
+
+

+ <% if collapsible %> + <%= image_tag("collapse.png") %> + <% end %> + Deferred actions <%= append_descriptor ? append_descriptor : '' %> +

+ +
+
+

Currently there are no deferred actions

+
+ + <%= render :partial => "todos/todo", :collection => deferred, :locals => { :parent_container_type => 'tickler' } %> + +
\ No newline at end of file diff --git a/app/views/todos/_hidden.rhtml b/app/views/todos/_hidden.rhtml new file mode 100644 index 00000000..21f7b013 --- /dev/null +++ b/app/views/todos/_hidden.rhtml @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/app/views/todos/tag.html.erb b/app/views/todos/tag.html.erb index 1ed6378d..b7e0ff30 100644 --- a/app/views/todos/tag.html.erb +++ b/app/views/todos/tag.html.erb @@ -1,21 +1,23 @@
-
> -

- No actions found -

+
> +

No actions found

Currently there are no incomplete actions with the tag '<%= @tag_name %>'

<%= render :partial => "contexts/context", :collection => @contexts_to_show, - :locals => { :collapsible => true } %> - + :locals => { :collapsible => true } %> + <% unless @deferred.nil? -%> - <%= render :partial => "todos/deferred", :locals => { :deferred => @deferred, :collapsible => true, :append_descriptor => "tagged with ‘#{@tag_name}’" } %> + <%= render :partial => "todos/deferred", :locals => { :deferred => @deferred, :collapsible => true, :append_descriptor => "tagged with ‘#{@tag_name}’" } %> + <% end -%> + + <% unless @hidden_todos.nil? -%> + <%= render :partial => "todos/hidden", :locals => { :hidden => @hidden_todos, :collapsible => true, :append_descriptor => "tagged with ‘#{@tag_name}’" } %> <% end -%> <% unless @done.nil? -%> <%= render :partial => "todos/completed", - :locals => { :done => @done, :collapsible => true, :append_descriptor => "tagged with ‘#{@tag_name}’" } %> + :locals => { :done => @done, :collapsible => true, :append_descriptor => "tagged with ‘#{@tag_name}’" } %> <% end -%>