Added a count of next actions to the /projects page, showing how many uncompleted next actions remain for each project. Fixes #7.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@58 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2005-04-03 15:03:59 +00:00
parent 0577e850f6
commit 8998c7f520
4 changed files with 11 additions and 3 deletions

View file

@ -17,5 +17,5 @@ class ApplicationController < ActionController::Base
end
total = Todo.find_all("done=0").length - sub
end
end

View file

@ -93,7 +93,7 @@ class ContextController < ApplicationController
expire_action(:controller => "context", :action => "list")
item = Todo.new
item.attributes = @params["new_item"]
# where = Context.find_by_id(item.context_id)
where = Context.find_by_id(item.context_id)
back_to = urlize(where.name)

View file

@ -1,6 +1,12 @@
<div id="display_box">
<table class="list" cellspacing="0" cellpadding="5" width="450" border="0">
<tr>
<th align="left">ID</th>
<th align="left">Name</th>
<th align="left">Next actions</th>
<th></th>
</tr>
<% row = 1 %>
<% for @project in @projects %>
<% if row % 2 == 0 %>
@ -9,7 +15,8 @@
<tr class="odd_row">
<% end %>
<td align="right" width="20"><%= @project.id.to_s %></td>
<td width="390"><%= link_to ( "#{@project.name}", :action => "show", :name => urlize(@project.name) ) %></td>
<td width="300"><%= link_to( "#{@project.name}", :action => "show", :name => urlize(@project.name) ) %></td>
<td width="70"><%= Todo.count( "project_id=#{@project.id} AND done=0" ).to_s %></td>
<td width="40">
<%= link_to(image_tag( "edit", :title => "Edit item", :width=>"10", :height=>"10", :border=>"0"), { :action => "edit", :id => @project.id } ) + " " +
link_to(image_tag( "delete", :title => "Delete item", :width=>"10", :height=>"10", :border=>"0"), { :action => "destroy", :id => @project.id}, :confirm => "Are you sure you want to delete this entry: #{@project.name}" ) + " "

View file

@ -23,6 +23,7 @@ Project wiki: <http://www.rousette.org.uk/projects/wiki/>
8. I added a pop-up calendar to set the due date. This is entirely lifted from Michele's excellent tutorial on pxl8.com <http://www.pxl8.com/calendar_date_picker.html>. It works well, but I need to make sure it doesn't break in postgresql or sqlite.
9. [Contributed by Nicholas Lee] Changes to the way that URLs are specified which should improve the situation for people using Tracks in a subdirectory.
10. [Contributed by Arnaud Limbourg, ticket:18] A new entry in settings.yml allows you to choose the number of completed actions you want to see on the /todo/list home page. Also sorts by due date (ascending) first, then creation date (descending) on /todo/list, /context/show/[name], and /project/show/[name]
11. Added a count of next actions to the /projects page, showing how many uncompleted next actions remain for each project.
## Version 1.02