diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-08 08:24:01 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-08 08:24:01 +0000 |
commit | 0e30724d660146d133318d9b3288a8a1eba4d8c4 (patch) | |
tree | 122f24969ad517248d59458e25f37726a342b191 /app/views/activities/index.html.erb | |
parent | 7222e4012db58c53d364e3b065e70338c094e878 (diff) | |
download | redmine-0e30724d660146d133318d9b3288a8a1eba4d8c4.tar.gz redmine-0e30724d660146d133318d9b3288a8a1eba4d8c4.zip |
Group events in the activity view (#12542).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10951 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/activities/index.html.erb')
-rw-r--r-- | app/views/activities/index.html.erb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index bb129477b..7522e4ba0 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -5,13 +5,14 @@ <% @events_by_day.keys.sort.reverse.each do |day| %> <h3><%= format_activity_day(day) %></h3> <dl> -<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> - <dt class="<%= e.event_type %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>"> +<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%> + <dt class="<%= e.event_type %> <%= "grouped" if in_group %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>"> <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %> <span class="time"><%= format_time(e.event_datetime, false) %></span> <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %> - <%= link_to format_activity_title(e.event_title), e.event_url %></dt> - <dd><span class="description"><%= format_activity_description(e.event_description) %></span> + <%= link_to format_activity_title(e.event_title), e.event_url %> + </dt> + <dd class="<%= "grouped" if in_group %>"><span class="description"><%= format_activity_description(e.event_description) %></span> <span class="author"><%= link_to_user(e.event_author) if e.respond_to?(:event_author) %></span></dd> <% end -%> </dl> |