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.html.erb @ 1061:01076ed49ffc
History | View | Annotate | Download (1.01 KB)
| 1 | 1006:4ffe9098c16c | chris | <% events = @events_by_day %>
|
|---|---|---|---|
| 2 | <% if (events.nil?)
|
||
| 3 | 1021:967fb7e62b1d | chris | activity = Redmine::Activity::Fetcher.new(User.anonymous)
|
| 4 | 1006:4ffe9098c16c | chris | events = activity.events(Date.today - 14, Date.today + 1)
|
| 5 | end
|
||
| 6 | %>
|
||
| 7 | |||
| 8 | <% if events.empty? %>
|
||
| 9 | |||
| 10 | <% else %>
|
||
| 11 | |||
| 12 | <ul>
|
||
| 13 | |||
| 14 | <%
|
||
| 15 | 1011:f44860e089c5 | chris | for project in busy_projects(events, 5)
|
| 16 | 1006:4ffe9098c16c | chris | %>
|
| 17 | |||
| 18 | <li class="busy"> |
||
| 19 | <span class="title"> |
||
| 20 | <% if !project.root? %>
|
||
| 21 | <% project.ancestors.each do |p| %>
|
||
| 22 | <%= h(p) %> » |
||
| 23 | <% end %>
|
||
| 24 | <% end %>
|
||
| 25 | <%= link_to_project project %>
|
||
| 26 | </span>
|
||
| 27 | <% if !project.is_public? %>
|
||
| 28 | <span class="private"><%= l(:field_is_private) %></span> |
||
| 29 | <% end %>
|
||
| 30 | <span class='managers'> |
||
| 31 | <%
|
||
| 32 | u = project.users_by_role
|
||
| 33 | if ! u.empty? %>
|
||
| 34 | (<%=
|
||
| 35 | mgmt_roles = u.keys.select{ |r| r.allowed_to?(:edit_project) }
|
||
| 36 | managers = mgmt_roles.map{ |r| u[r] }.flatten.sort.uniq
|
||
| 37 | managers.map{ |m| m.name }.join(', ')
|
||
| 38 | %>)<% |
||
| 39 | end
|
||
| 40 | %>
|
||
| 41 | </span>
|
||
| 42 | |||
| 43 | <%= render_project_short_description project %>
|
||
| 44 | </li>
|
||
| 45 | |||
| 46 | <% end %>
|
||
| 47 | </ul>
|
||
| 48 | <% end %> |