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 / index.html.erb @ 1531:ae8145b28b2b

History | View | Annotate | Download (3.18 KB)

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)).html_safe
10
  end
11
  %></h2>
12
<p class="subtitle"><%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %></p>
13

    
14
<div id="activity">
15
<% @events_by_day.keys.sort.reverse.each do |day| %>
16
<h3><%= format_activity_day(day) %></h3>
17
<dl>
18
<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
19
  <dt class="<%= e.event_type %> <%= "grouped" if in_group %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
20
  <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %>
21
  <span class="time"><%= format_time(e.event_datetime, false) %></span>
22
  <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %>
23
  <%= link_to format_activity_title(e.event_title), e.event_url %>
24
  </dt>
25
  <dd class="<%= "grouped" if in_group %>"><span class="description"><%= format_activity_description(e.event_description) %></span>
26
  <span class="author"><%= link_to_user(e.event_author) if e.respond_to?(:event_author) %></span></dd>
27
<% end -%>
28
</dl>
29
<% end -%>
30
</div>
31

    
32
<%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %>
33

    
34
<div style="float:left;">
35
<%= link_to_content_update("\xc2\xab " + l(:label_previous),
36
                   params.merge(:from => @date_to - @days - 1),
37
                   :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1))) %>
38
</div>
39
<div style="float:right;">
40
<%= link_to_content_update(l(:label_next) + " \xc2\xbb",
41
                   params.merge(:from => @date_to + @days - 1),
42
                   :title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1))) unless @date_to >= Date.today %>
43
</div>
44
&nbsp;
45
<% other_formats_links do |f| %>
46
  <%= f.link_to 'Atom', :url => params.merge(:from => nil, :key => User.current.rss_key) %>
47
<% end %>
48

    
49
<% content_for :header_tags do %>
50
<%= auto_discovery_link_tag(:atom, params.merge(:format => 'atom', :from => nil, :key => User.current.rss_key)) %>
51
<% end %>
52

    
53
<% content_for :sidebar do %>
54
<%= form_tag({}, :method => :get) do %>
55
<h3><%= l(:label_activity) %></h3>
56
<ul>
57
<% @activity.event_types.each do |t| %>
58
  <li>
59
    <%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %>
60
    <label for="show_<%=t%>">
61
      <%= link_to(l("label_#{t.singularize}_plural"),
62
                  {"show_#{t}" => 1, :user_id => params[:user_id], :from => params[:from]})%>
63
    </label>
64
  </li>
65
<% end %>
66
</ul>
67
<% if @project && @project.descendants.active.any? %>
68
    <%= hidden_field_tag 'with_subprojects', 0 %>
69
    <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p>
70
<% end %>
71
<%= hidden_field_tag('user_id', params[:user_id]) unless params[:user_id].blank? %>
72
<p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p>
73
<% end %>
74
<% end %>
75

    
76
<% html_title(l(:label_activity), @author) -%>