You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html.erb 2.9KB

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