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 @ 379:f25c73364bfb

History | View | Annotate | Download (3.19 KB)

1
<h2><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)) %></h2>
2
<p class="subtitle"><%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %></p>
3

    
4
<div id="activity">
5
<% @events_by_day.keys.sort.reverse.each do |day| %>
6
<h3><%= format_activity_day(day) %></h3>
7
<dl>
8
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
9
  <dt class="<%= e.event_type %>  <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
10
        <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %>
11
  <span class="time"><%= format_time(e.event_datetime, false) %></span>
12
  <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %>
13
  <%= link_to format_activity_title(e.event_title), e.event_url %></dt>
14
  <dd><span class="description"><%= format_activity_description(e.event_description) %></span>
15
  <span class="author"><%= e.event_author if e.respond_to?(:event_author) %></span></dd>
16
<% end -%>
17
</dl>
18
<% end -%>
19
</div>
20

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

    
23
<div style="float:left;">
24
<%= link_to_remote(('&#171; ' + l(:label_previous)), 
25
                   {:update => "content", :url => params.merge(:from => @date_to - @days - 1), :method => :get, :complete => 'window.scrollTo(0,0)'},
26
                   {:href => url_for(params.merge(:from => @date_to - @days - 1)),
27
                    :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1))}) %>
28
</div>
29
<div style="float:right;">
30
<%= link_to_remote((l(:label_next) + ' &#187;'), 
31
                   {:update => "content", :url => params.merge(:from => @date_to + @days - 1), :method => :get, :complete => 'window.scrollTo(0,0)'},
32
                   {:href => url_for(params.merge(:from => @date_to + @days - 1)),
33
                    :title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1))}) unless @date_to >= Date.today %>
34
</div>
35
&nbsp;
36
<% other_formats_links do |f| %>
37
        <%= f.link_to 'Atom', :url => params.merge(:from => nil, :key => User.current.rss_key) %>
38
<% end %>
39

    
40
<% content_for :header_tags do %>
41
<%= auto_discovery_link_tag(:atom, params.merge(:format => 'atom', :from => nil, :key => User.current.rss_key)) %>
42
<% end %>
43

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

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