Revision 1078:b9e34a051f82 app/views/activities

View differences:

app/views/activities/_busy.html.erb
1
<% events = @events_by_day %>
2
<% if (events.nil?) 
3
     activity = Redmine::Activity::Fetcher.new(User.anonymous)
4
     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
      for project in busy_projects(events, 5)
16
   %>
17

  
18
   <li class="busy">
19
     <span class="title">
20
       <% if !project.root? %>
21
         <% project.ancestors.each do |p| %>
22
           <%= h(p) %>&nbsp;&#187;
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 %>
app/views/activities/_busy_institution.html.erb
1
<% events = @events_by_day %>
2
<% if (events.nil?) 
3
     activity = Redmine::Activity::Fetcher.new(User.anonymous)
4
     days = Setting.activity_days_default.to_i
5
     events = activity.events(Date.today - days, Date.today + 1)
6
   end
7
%>
8

  
9
<% if events.empty? %>
10

  
11
<% else %>
12

  
13
   <ul>
14

  
15
   <% 
16
      for institution in busy_institutions(events, 5)
17
   %>
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 %>
28

  
app/views/activities/index.html.erb
1
<h2><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)) %></h2>
1
<h2><%=
2
  if @author.nil?
3
    if @institution_name.blank?
4
      l(:label_activity)
5
    else
6
      l(:label_institution_activity, h(@institution_name))
7
    end
8
  else
9
    l(:label_user_activity, link_to_user(@author))
10
  end
11
  %></h2>
2 12
<p class="subtitle"><%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %></p>
3 13

  
4 14
<div id="activity">

Also available in: Unified diff