Mercurial > hg > soundsoftware-site
comparison app/views/activities/_busy_institution.html.erb @ 1020:e816ffefcb71 browsing
Use setting for number of activities days rather than hardcoding it
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Tue, 13 Nov 2012 10:24:11 +0000 |
parents | f44860e089c5 |
children | 967fb7e62b1d |
comparison
equal
deleted
inserted
replaced
1019:76cce7d14bd0 | 1020:e816ffefcb71 |
---|---|
1 <% events = @events_by_day %> | 1 <% events = @events_by_day %> |
2 <% if (events.nil?) | 2 <% if (events.nil?) |
3 activity = Redmine::Activity::Fetcher.new(User.current) | 3 activity = Redmine::Activity::Fetcher.new(User.current) |
4 events = activity.events(Date.today - 14, Date.today + 1) | 4 days = Setting.activity_days_default.to_i |
5 events = activity.events(Date.today - days, Date.today + 1) | |
5 end | 6 end |
6 %> | 7 %> |
7 | 8 |
8 <% if events.empty? %> | 9 <% if events.empty? %> |
9 | 10 |