Changeset 850

Show
Ignore:
Timestamp:
05/16/08 14:32:42
Author:
lrbalt
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tracks/app/controllers/projects_controller.rb

    r837 r850  
    1919        @projects = @projects.select { |p| p.active? && count_undone_todos(p) == 0 } 
    2020      end 
     21      init_project_hidden_todo_counts(['project']) 
    2122      respond_to do |format| 
    2223        format.html  &render_projects_html 
     
    186187  def render_projects_html 
    187188    lambda do 
    188       init_project_hidden_todo_counts(['project']) 
    189189      @page_title = "TRACKS::List Projects" 
    190190      @count = current_user.projects.size  
  • trunk/tracks/app/helpers/application_helper.rb

    r832 r850  
    9090  end 
    9191   
    92   # Returns a count of next actions in the given context or project The result 
     92  # Returns a count of next actions in the given context or project. The result 
    9393  # is count and a string descriptor, correctly pluralised if there are no 
    9494  # actions or multiple actions 
  • trunk/tracks/app/views/contexts/_mobile_context_listing.rhtml

    r823 r850  
    11<%  context = mobile_context_listing %> 
    2 <div id="ctx"><%= link_to context.name, formatted_context_path(context, :m) %></div> 
     2<div id="ctx"><%= link_to context.name, formatted_context_path(context, :m) %><%= " (" + count_undone_todos_phrase(context,"actions") + ")" %></div> 
  • trunk/tracks/app/views/projects/_mobile_project_listing.rhtml

    r823 r850  
    11<%  project = mobile_project_listing %> 
    2 <div id="pjr"><%= link_to project.name, formatted_project_path(project) %></div> 
     2<div id="pjr"><%= link_to project.name, formatted_project_path(project) %><%= " (" + count_undone_todos_and_notes_phrase(project,"actions") + ")" %></div>