mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 08:10:13 +01:00
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:
parent
f161ddf4ff
commit
cc78e8b58b
2 changed files with 6 additions and 6 deletions
|
|
@ -35,11 +35,11 @@ class TodoController < ApplicationController
|
||||||
day = (60 * 60 * 24)
|
day = (60 * 60 * 24)
|
||||||
today = Time.now
|
today = Time.now
|
||||||
|
|
||||||
today_date = today - 1 * day
|
today_date = today - (1 * day)
|
||||||
week_begin = today - 2 * day
|
week_begin = today - (1 * day)
|
||||||
week_end = today - 7* day
|
week_end = today - (7 * day)
|
||||||
month_begin = today - 8 * day
|
month_begin = today - (8 * day)
|
||||||
month_end = today - 31 * day
|
month_end = today - (31 * day)
|
||||||
|
|
||||||
@done_today = @done.collect { |x| today_date <= x.completed ? x:nil }.compact
|
@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
|
@done_this_week = @done.collect { |x| week_begin >= x.completed && week_end <= x.completed ? x:nil }.compact
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
:url => { :controller => "todo", :action => "add_item" },
|
:url => { :controller => "todo", :action => "add_item" },
|
||||||
:update => "new_actions",
|
:update => "new_actions",
|
||||||
:position=> "bottom",
|
: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' }) %>
|
:html=> { :id=>'todo-form-new-action', :name=>'todo', :class => 'inline-form' }) %>
|
||||||
|
|
||||||
<label for="new_item_description">Description</label><br />
|
<label for="new_item_description">Description</label><br />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue