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 @ 1040:ff783f2cc500

History | View | Annotate | Download (3.05 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))
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
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
19
  <dt class="<%= e.event_type %>  <%= 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 %></dt>
24
  <dd><span class="description"><%= format_activity_description(e.event_description) %></span>
25
  <span class="author"><%= link_to_user(e.event_author) if e.respond_to?(:event_author) %></span></dd>
26
<% end -%>
27
</dl>
28
<% end -%>
29
</div>
30

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

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

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

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

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