To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / activities / _busy_institution.html.erb @ 1078:b9e34a051f82
History | View | Annotate | Download (552 Bytes)
| 1 | 1009:066b55d7c053 | chris | <% events = @events_by_day %>
|
|---|---|---|---|
| 2 | <% if (events.nil?)
|
||
| 3 | 1021:967fb7e62b1d | chris | activity = Redmine::Activity::Fetcher.new(User.anonymous)
|
| 4 | 1020:e816ffefcb71 | chris | days = Setting.activity_days_default.to_i
|
| 5 | events = activity.events(Date.today - days, Date.today + 1)
|
||
| 6 | 1009:066b55d7c053 | chris | end
|
| 7 | %>
|
||
| 8 | |||
| 9 | <% if events.empty? %>
|
||
| 10 | |||
| 11 | <% else %>
|
||
| 12 | |||
| 13 | <ul>
|
||
| 14 | |||
| 15 | <%
|
||
| 16 | 1011:f44860e089c5 | chris | for institution in busy_institutions(events, 5)
|
| 17 | 1009:066b55d7c053 | chris | %>
|
| 18 | |||
| 19 | <li class="busy"> |
||
| 20 | <span class="title"> |
||
| 21 | <%= link_to h(institution), { :controller => 'activities', :institution => institution } %>
|
||
| 22 | </span>
|
||
| 23 | </li>
|
||
| 24 | |||
| 25 | <% end %>
|
||
| 26 | </ul>
|
||
| 27 | <% end %>
|