diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb
index 03e5971e..99566671 100644
--- a/app/controllers/todos_controller.rb
+++ b/app/controllers/todos_controller.rb
@@ -551,7 +551,7 @@ class TodosController < ApplicationController
@page_title = t('todos.deferred_tasks_title')
@contexts_to_show = @contexts = current_user.contexts
- @projects_to_show = @projects = current_user.projects
+ @projects_to_show = @projects = current_user.projects.active + current_user.projects.hidden
includes = params[:format]=='xml' ? [:context, :project] : Todo::DEFAULT_INCLUDES
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 1a55fdd3..2d50f9e0 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -29,7 +29,7 @@
- <% cache [:navbar] do -%>
+ <% cache [:navbar, @count||@badge_count] do -%>
<%= render partial: "shared/navbar" %>
<% end -%>
diff --git a/app/views/todos/_container_items.html.erb b/app/views/todos/_container_items.html.erb
index bf68a7b6..e6ace181 100644
--- a/app/views/todos/_container_items.html.erb
+++ b/app/views/todos/_container_items.html.erb
@@ -1,11 +1,9 @@
-
<% cache [settings[:container_name], settings[:show_empty_message]] do %>
<%= render partial: "todos/container_empty_message", locals: {
container_id: settings[:container_id],
container_name: settings[:container_name],
show_empty_message: settings[:show_empty_message]} -%>
<% end -%>
-
<%= render(:partial => "todos/todo", :collection => collection, :locals => settings) %>
\ No newline at end of file
diff --git a/app/views/todos/_todo.html.erb b/app/views/todos/_todo.html.erb
index 2d7ef183..6cd778a4 100644
--- a/app/views/todos/_todo.html.erb
+++ b/app/views/todos/_todo.html.erb
@@ -1,41 +1,37 @@
-<%
- suppress_context ||= false
- suppress_project ||= false
- cache [todo, current_user.date.strftime("%Y%m%d"), @source_view, current_user.prefs.verbose_action_descriptors] do
--%>
- ">
-
-
-
- ">
- ">
+<% cache [todo, current_user.date.strftime("%Y%m%d"), @source_view, current_user.prefs.verbose_action_descriptors] do -%>
+ ">
+
+
+
+ ">
+ ">
+
+
+ "><%= todo.description %>
+
+ <%= content_tag(:i, {class: "icon-refresh"}){} if todo.from_recurring_todo? -%>
+ <%= deferred_due_date(todo) -%>
+ <%= content_tag(:i, {class: "icon-sitemap"}){} if todo.has_pending_successors -%>
+ <%= content_tag(:i, {class: "icon-book", "data-note-id" => dom_id(todo, 'notes')}){} unless todo.notes.blank? %>
-
- "><%= todo.description %>
-
- <%= content_tag(:i, {class: "icon-refresh"}){} if todo.from_recurring_todo? -%>
- <%= deferred_due_date(todo) -%>
- <%= content_tag(:i, {class: "icon-sitemap"}){} if todo.has_pending_successors -%>
- <%= content_tag(:i, {class: "icon-book", "data-note-id" => dom_id(todo, 'notes')}){} unless todo.notes.blank? %>
-
-
-
-
- project: <%= todo.project.name.blank? ? "none" : link_to(todo.project.name, todo.project) %>
- context: <%= todo.context.name.blank? ? "none" : link_to(todo.context.name, todo.context) %>
-
-
-
-
- <%= date_span(todo) -%>
- <%= tag_list(todo) %>
-
+
+
+
+ project: <%= todo.project.name.blank? ? "none" : link_to(todo.project.name, todo.project) %>
+ context: <%= todo.context.name.blank? ? "none" : link_to(todo.context.name, todo.context) %>
+
+
-
-
- <%= todo_notes(todo) %>
-
+
+ <%= date_span(todo) -%>
+ <%= tag_list(todo) %>
+
+
+ <%= todo_notes(todo) %>
+
+
+
<% end -%>
\ No newline at end of file
diff --git a/app/views/todos/index.html.erb b/app/views/todos/index.html.erb
index 1f31ba41..3e41bdad 100644
--- a/app/views/todos/index.html.erb
+++ b/app/views/todos/index.html.erb
@@ -17,6 +17,6 @@
-%>
<% # use the first completed todo (which is the last one to be completed) as cache invariant
- cache [@done.first, "home_completed"] do %>
+ cache [@done.first, "home_completed"] do -%>
<%= show_done_todos(@done, {:parent_container_type => @group_view_by, :collapsible => true}) unless @done.nil? %>
-<% end %>
\ No newline at end of file
+<% end -%>
\ No newline at end of file
diff --git a/app/views/todos/list_deferred.html.erb b/app/views/todos/list_deferred.html.erb
index 599855b9..5cc28c90 100644
--- a/app/views/todos/list_deferred.html.erb
+++ b/app/views/todos/list_deferred.html.erb
@@ -1,15 +1,17 @@
-
+<%# Template Dependency: todos/collection -%>
+<%# Template Dependency: contexts/context -%>
+<%# Template Dependency: projects/project -%>
+<% cache [@not_done_todos.empty?, "tickler_not_done"] do -%>
+ <%= render partial: "empty_message_container", locals: {:show => @not_done_todos.empty?, :container_name => "not_done"} %>
+<% end -%>
- <%= empty_message_holder("deferred_pending", @not_done_todos.empty?) %>
+<%= show_grouped_todos %>
- <%= show_grouped_todos %>
-
- <% if @group_view_by == 'project' -%>
- <%= show_todos_without_project(@todos_without_project) -%>
- <% end -%>
-
-
-
- <%= render :partial => "shared/add_new_item_form" %>
- <%= render :file => "sidebar/sidebar" %>
-
+<% if @group_view_by == 'project'
+ # use the last updated todo without a project as cache invariant.
+ # Changing an exisiting todo or adding a new one will result in a new cache key
+ cache [@last_updated_todo_without_project, "todos_without_project"] do -%>
+ <%= show_todos_without_project(@todos_without_project) %>
+<% end
+ end
+-%>
\ No newline at end of file