Change the TimelogController's to/from dates based on the project time entries

Instead of looking for the earliest and latest time entry system wide for the
dates in the form, now TimelogController will only look at the time entries
for the current project (and parent/sub projects).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4087 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-09-14 19:02:25 +00:00
parent 8900797ada
commit cdfc57d544
5 changed files with 65 additions and 15 deletions

View File

@@ -260,8 +260,8 @@ private
end
@from, @to = @to, @from if @from && @to && @from > @to
@from ||= (TimeEntry.earilest_date_for_project || Date.today) - 1
@to ||= (TimeEntry.latest_date_for_project || Date.today)
@from ||= (TimeEntry.earilest_date_for_project(@project) || Date.today)
@to ||= (TimeEntry.latest_date_for_project(@project) || Date.today)
end
def load_available_criterias