Applied lolindrath's patch to fix #73: next actions which were completed yesterday now show up correctly in the 'Completed in the last 7 days' box on the completed action view.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@139 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2005-08-26 18:28:03 +00:00
parent f161ddf4ff
commit cc78e8b58b
2 changed files with 6 additions and 6 deletions

View file

@ -35,11 +35,11 @@ class TodoController < ApplicationController
day = (60 * 60 * 24)
today = Time.now
today_date = today - 1 * day
week_begin = today - 2 * day
week_end = today - 7* day
month_begin = today - 8 * day
month_end = today - 31 * day
today_date = today - (1 * day)
week_begin = today - (1 * day)
week_end = today - (7 * day)
month_begin = today - (8 * day)
month_end = today - (31 * day)
@done_today = @done.collect { |x| today_date <= x.completed ? x:nil }.compact
@done_this_week = @done.collect { |x| week_begin >= x.completed && week_end <= x.completed ? x:nil }.compact

View file

@ -20,7 +20,7 @@
:url => { :controller => "todo", :action => "add_item" },
:update => "new_actions",
:position=> "bottom",
:complete => "Form.focusFirstElement('todo-form-new-action');Form.reset('todo-form-new-action')",
:complete => "Form.focusFirstElement('todo-form-new-action');Form.reset('todo-form-new-action');",
:html=> { :id=>'todo-form-new-action', :name=>'todo', :class => 'inline-form' }) %>
<label for="new_item_description">Description</label><br />