fixes #701. adding counts to mobile project and context listing

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@850 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lrbalt 2008-05-16 14:32:42 +00:00
parent 179205dd9e
commit 30f93cf71b
4 changed files with 4 additions and 4 deletions

View file

@ -18,6 +18,7 @@ class ProjectsController < ApplicationController
if params[:only_active_with_no_next_actions]
@projects = @projects.select { |p| p.active? && count_undone_todos(p) == 0 }
end
init_project_hidden_todo_counts(['project'])
respond_to do |format|
format.html &render_projects_html
format.m &render_projects_mobile
@ -185,7 +186,6 @@ class ProjectsController < ApplicationController
def render_projects_html
lambda do
init_project_hidden_todo_counts(['project'])
@page_title = "TRACKS::List Projects"
@count = current_user.projects.size
@active_projects = @projects.select{ |p| p.active? }

View file

@ -89,7 +89,7 @@ module ApplicationHelper
end
end
# Returns a count of next actions in the given context or project The result
# Returns a count of next actions in the given context or project. The result
# is count and a string descriptor, correctly pluralised if there are no
# actions or multiple actions
#

View file

@ -1,2 +1,2 @@
<% context = mobile_context_listing %>
<div id="ctx"><%= link_to context.name, formatted_context_path(context, :m) %></div>
<div id="ctx"><%= link_to context.name, formatted_context_path(context, :m) %><%= " (" + count_undone_todos_phrase(context,"actions") + ")" %></div>

View file

@ -1,2 +1,2 @@
<% project = mobile_project_listing %>
<div id="pjr"><%= link_to project.name, formatted_project_path(project) %></div>
<div id="pjr"><%= link_to project.name, formatted_project_path(project) %><%= " (" + count_undone_todos_and_notes_phrase(project,"actions") + ")" %></div>