@@ -1,59 +1,59 | |||||
1 | <h2><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)) %></h2> |
|
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> |
|
2 | <p class="subtitle"><%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %></p> | |
3 |
|
3 | |||
4 | <div id="activity"> |
|
4 | <div id="activity"> | |
5 | <% @events_by_day.keys.sort.reverse.each do |day| %> |
|
5 | <% @events_by_day.keys.sort.reverse.each do |day| %> | |
6 | <h3><%= format_activity_day(day) %></h3> |
|
6 | <h3><%= format_activity_day(day) %></h3> | |
7 | <dl> |
|
7 | <dl> | |
8 | <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> |
|
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 %>"> |
|
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) %> |
|
10 | <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %> | |
11 | <span class="time"><%= format_time(e.event_datetime, false) %></span> |
|
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 %> |
|
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> |
|
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> |
|
14 | <dd><span class="description"><%= format_activity_description(e.event_description) %></span> | |
15 | <span class="author"><%= link_to_user(e.event_author) if e.respond_to?(:event_author) %></span></dd> |
|
15 | <span class="author"><%= link_to_user(e.event_author) if e.respond_to?(:event_author) %></span></dd> | |
16 | <% end -%> |
|
16 | <% end -%> | |
17 | </dl> |
|
17 | </dl> | |
18 | <% end -%> |
|
18 | <% end -%> | |
19 | </div> |
|
19 | </div> | |
20 |
|
20 | |||
21 | <%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %> |
|
21 | <%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %> | |
22 |
|
22 | |||
23 | <div style="float:left;"> |
|
23 | <div style="float:left;"> | |
24 |
<%= link_to_content_update( |
|
24 | <%= link_to_content_update("\xc2\xab " + l(:label_previous), | |
25 | params.merge(:from => @date_to - @days - 1), |
|
25 | params.merge(:from => @date_to - @days - 1), | |
26 | :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1))) %> |
|
26 | :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1))) %> | |
27 | </div> |
|
27 | </div> | |
28 | <div style="float:right;"> |
|
28 | <div style="float:right;"> | |
29 |
<%= link_to_content_update(l(:label_next) + |
|
29 | <%= link_to_content_update(l(:label_next) + " \xc2\xbb", | |
30 | params.merge(:from => @date_to + @days - 1), |
|
30 | params.merge(:from => @date_to + @days - 1), | |
31 | :title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1))) unless @date_to >= Date.today %> |
|
31 | :title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1))) unless @date_to >= Date.today %> | |
32 | </div> |
|
32 | </div> | |
33 | |
|
33 | | |
34 | <% other_formats_links do |f| %> |
|
34 | <% other_formats_links do |f| %> | |
35 | <%= f.link_to 'Atom', :url => params.merge(:from => nil, :key => User.current.rss_key) %> |
|
35 | <%= f.link_to 'Atom', :url => params.merge(:from => nil, :key => User.current.rss_key) %> | |
36 | <% end %> |
|
36 | <% end %> | |
37 |
|
37 | |||
38 | <% content_for :header_tags do %> |
|
38 | <% content_for :header_tags do %> | |
39 | <%= auto_discovery_link_tag(:atom, params.merge(:format => 'atom', :from => nil, :key => User.current.rss_key)) %> |
|
39 | <%= auto_discovery_link_tag(:atom, params.merge(:format => 'atom', :from => nil, :key => User.current.rss_key)) %> | |
40 | <% end %> |
|
40 | <% end %> | |
41 |
|
41 | |||
42 | <% content_for :sidebar do %> |
|
42 | <% content_for :sidebar do %> | |
43 | <% form_tag({}, :method => :get) do %> |
|
43 | <% form_tag({}, :method => :get) do %> | |
44 | <h3><%= l(:label_activity) %></h3> |
|
44 | <h3><%= l(:label_activity) %></h3> | |
45 | <p><% @activity.event_types.each do |t| %> |
|
45 | <p><% @activity.event_types.each do |t| %> | |
46 | <%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %> |
|
46 | <%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %> | |
47 | <%= link_to(l("label_#{t.singularize}_plural"), {"show_#{t}" => 1, :user_id => params[:user_id]})%> |
|
47 | <%= link_to(l("label_#{t.singularize}_plural"), {"show_#{t}" => 1, :user_id => params[:user_id]})%> | |
48 | <br /> |
|
48 | <br /> | |
49 | <% end %></p> |
|
49 | <% end %></p> | |
50 | <% if @project && @project.descendants.active.any? %> |
|
50 | <% if @project && @project.descendants.active.any? %> | |
51 | <%= hidden_field_tag 'with_subprojects', 0 %> |
|
51 | <%= hidden_field_tag 'with_subprojects', 0 %> | |
52 | <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p> |
|
52 | <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p> | |
53 | <% end %> |
|
53 | <% end %> | |
54 | <%= hidden_field_tag('user_id', params[:user_id]) unless params[:user_id].blank? %> |
|
54 | <%= hidden_field_tag('user_id', params[:user_id]) unless params[:user_id].blank? %> | |
55 | <p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p> |
|
55 | <p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p> | |
56 | <% end %> |
|
56 | <% end %> | |
57 | <% end %> |
|
57 | <% end %> | |
58 |
|
58 | |||
59 | <% html_title(l(:label_activity), @author) -%> |
|
59 | <% html_title(l(:label_activity), @author) -%> |
General Comments 0
You need to be logged in to leave comments.
Login now