To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / activities / index.html.erb @ 1298:4f746d8966dd
History | View | Annotate | Download (3.13 KB)
| 1 | 1009:066b55d7c053 | chris | <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 | 1116:bb32da3bea34 | Chris | l(:label_user_activity, link_to_user(@author)).html_safe
|
| 10 | 1009:066b55d7c053 | chris | end
|
| 11 | %></h2> |
||
| 12 | 22:40f7cfd4df19 | chris | <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 | 1295:622f24f53b42 | Chris | <% 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 | 909:cbb26bc654de | Chris | <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %>
|
| 21 | 22:40f7cfd4df19 | chris | <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 | 1295:622f24f53b42 | Chris | <%= 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 | 909:cbb26bc654de | Chris | <span class="author"><%= link_to_user(e.event_author) if e.respond_to?(:event_author) %></span></dd> |
| 27 | 22:40f7cfd4df19 | chris | <% 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 | 909:cbb26bc654de | Chris | <%= link_to_content_update("\xc2\xab " + l(:label_previous),
|
| 36 | 441:cbce1fd3b1b7 | Chris | 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 | 22:40f7cfd4df19 | chris | </div>
|
| 39 | <div style="float:right;"> |
||
| 40 | 909:cbb26bc654de | Chris | <%= link_to_content_update(l(:label_next) + " \xc2\xbb",
|
| 41 | 441:cbce1fd3b1b7 | Chris | 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 | 22:40f7cfd4df19 | chris | </div>
|
| 44 |
|
||
| 45 | <% other_formats_links do |f| %>
|
||
| 46 | 909:cbb26bc654de | Chris | <%= f.link_to 'Atom', :url => params.merge(:from => nil, :key => User.current.rss_key) %>
|
| 47 | 22:40f7cfd4df19 | chris | <% 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 | 1115:433d4f72a19b | Chris | <%= form_tag({}, :method => :get) do %>
|
| 55 | 22:40f7cfd4df19 | chris | <h3><%= l(:label_activity) %></h3> |
| 56 | <p><% @activity.event_types.each do |t| %> |
||
| 57 | <%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %>
|
||
| 58 | 1295:622f24f53b42 | Chris | <label for="show_<%=t%>"><%= link_to(l("label_#{t.singularize}_plural"), {"show_#{t}" => 1, :user_id => params[:user_id], :from => params[:from]})%></label> |
| 59 | 22:40f7cfd4df19 | chris | <br /> |
| 60 | <% end %></p> |
||
| 61 | <% if @project && @project.descendants.active.any? %>
|
||
| 62 | 909:cbb26bc654de | Chris | <%= hidden_field_tag 'with_subprojects', 0 %>
|
| 63 | 22:40f7cfd4df19 | chris | <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p> |
| 64 | <% end %>
|
||
| 65 | <%= hidden_field_tag('user_id', params[:user_id]) unless params[:user_id].blank? %>
|
||
| 66 | <p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p> |
||
| 67 | <% end %>
|
||
| 68 | <% end %>
|
||
| 69 | |||
| 70 | <% html_title(l(:label_activity), @author) -%> |