diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index ce2d97e5..36155659 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -448,7 +448,10 @@ class TodosController < ApplicationController def calendar @source_view = params['_source_view'] || 'calendar' @page_title = "TRACKS::Calendar" - + + @projects = current_user.projects.find(:all) + @default_project_context_name_map = build_default_project_context_name_map(@projects).to_json + due_today_date = Time.zone.now due_this_week_date = Time.zone.now.end_of_week due_next_week_date = due_this_week_date + 7.days diff --git a/app/views/todos/calendar.html.erb b/app/views/todos/calendar.html.erb index 0d7e1dcb..9e705216 100644 --- a/app/views/todos/calendar.html.erb +++ b/app/views/todos/calendar.html.erb @@ -1,5 +1,5 @@
- +

Due today

> @@ -9,7 +9,7 @@ <%= render :partial => "todos/todo", :collection => @due_today %>
- +

Due in rest of this week

> @@ -19,7 +19,7 @@ <%= render :partial => "todos/todo", :collection => @due_this_week %>
- +

Due next week

> @@ -29,7 +29,7 @@ <%= render :partial => "todos/todo", :collection => @due_next_week %>
- +

Due in rest of <%= Time.zone.now.strftime("%B") %>

> @@ -39,7 +39,7 @@ <%= render :partial => "todos/todo", :collection => @due_this_month %>
- +

Due in <%= (Time.zone.now+1.month).strftime("%B") %> and later

> @@ -49,9 +49,14 @@ <%= render :partial => "todos/todo", :collection => @due_after_this_month %>
- +
+ <% # hack for #860 Need to refactor this and use another dom element to bind projectDefauiltContextsMap to -%> + +