To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / app / views / activities / _busy.html.erb @ 1356:a6a25685e5a6

History | View | Annotate | Download (1.06 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 1186:e19f375f9afa chris
     days = Setting.activity_days_default.to_i
5
     events = activity.events(Date.today - days, Date.today + 1)
6 1006:4ffe9098c16c chris
   end
7
%>
8
9
<% if events.empty? %>
10
11
<% else %>
12
13
   <ul>
14
15
   <%
16 1346:befaf13fec0d Chris
      for project in busy_projects(events, 7)
17 1006:4ffe9098c16c chris
   %>
18
19
   <li class="busy">
20
     <span class="title">
21
       <% if !project.root? %>
22
         <% project.ancestors.each do |p| %>
23
           <%= h(p) %>&nbsp;&#187;
24
         <% end %>
25
       <% end %>
26
       <%= link_to_project project %>
27
     </span>
28
     <% if !project.is_public? %>
29
       <span class="private"><%= l(:field_is_private) %></span>
30
     <% end %>
31
     <span class='managers'>
32
     <%
33
        u = project.users_by_role
34
        if ! u.empty? %>
35 1186:e19f375f9afa chris
        <%=
36 1006:4ffe9098c16c chris
           mgmt_roles = u.keys.select{ |r| r.allowed_to?(:edit_project) }
37
           managers = mgmt_roles.map{ |r| u[r] }.flatten.sort.uniq
38
           managers.map{ |m| m.name }.join(', ')
39 1184:1027f0f3a81a chris
         %><%
40 1006:4ffe9098c16c chris
        end
41
        %>
42
        </span>
43
44
     <%= render_project_short_description project %>
45
   </li>
46
47
    <% end %>
48
  </ul>
49 1190:91db8e091f10 chris
50 1006:4ffe9098c16c chris
<% end %>