Mercurial > hg > soundsoftware-site
comparison app/controllers/.svn/text-base/timelog_controller.rb.svn-base @ 22:40f7cfd4df19
* Update to SVN trunk rev 4173
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 24 Sep 2010 14:06:04 +0100 |
parents | 1d32c0a0efbf |
children | 94944d00e43c |
comparison
equal
deleted
inserted
replaced
14:1d32c0a0efbf | 22:40f7cfd4df19 |
---|---|
258 else | 258 else |
259 # default | 259 # default |
260 end | 260 end |
261 | 261 |
262 @from, @to = @to, @from if @from && @to && @from > @to | 262 @from, @to = @to, @from if @from && @to && @from > @to |
263 @from ||= (TimeEntry.minimum(:spent_on, :include => :project, :conditions => Project.allowed_to_condition(User.current, :view_time_entries)) || Date.today) - 1 | 263 @from ||= (TimeEntry.earilest_date_for_project(@project) || Date.today) |
264 @to ||= (TimeEntry.maximum(:spent_on, :include => :project, :conditions => Project.allowed_to_condition(User.current, :view_time_entries)) || Date.today) | 264 @to ||= (TimeEntry.latest_date_for_project(@project) || Date.today) |
265 end | 265 end |
266 | 266 |
267 def load_available_criterias | 267 def load_available_criterias |
268 @available_criterias = { 'project' => {:sql => "#{TimeEntry.table_name}.project_id", | 268 @available_criterias = { 'project' => {:sql => "#{TimeEntry.table_name}.project_id", |
269 :klass => Project, | 269 :klass => Project, |