From a6d82e144be3b255a49b89d254452bc289f9e02a Mon Sep 17 00:00:00 2001 From: Magdalena Kafka Date: Tue, 8 Dec 2015 15:45:39 +0100 Subject: [PATCH] Update activities markup on user show view * and fix missing icons --- app/views/users/show.html.erb | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 467fdc5f53..a1e90c9a8d 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -83,17 +83,23 @@ See doc/COPYRIGHT.rdoc for more details.
<% @events_by_day.keys.sort.reverse.each do |day| %>

<%= format_activity_day(day) %>

-
+
    <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> -
    - <%= icon_wrapper("icon-context icon-#{e.event_type}", e.event_name) %> - <%= format_time(e.event_datetime, false) %> - <%= content_tag('span', h(e.project), class: 'project') %> - <%= link_to format_activity_title(e.event_title), e.event_url %> -
    -
    <%= format_activity_description(e.event_description) %>
    +
  • +
    + <% event_type = e.event_type == 'meeting' ? 'meetings' : e.event_type %> + <% event_type = e.event_type == 'cost_object' ? 'budget' : event_type %> + <%= icon_wrapper("icon-context icon-#{event_type}", e.event_name) %> + <%= format_time(e.event_datetime, false) %> + <%= content_tag('span', h(e.project), class: 'project') %> + <%= link_to format_activity_title(e.event_title), e.event_url %> +
    +
    + <%= format_activity_description(e.event_description) %> +
    +
  • <% end -%> -
+ <% end -%>