Update activities markup on user show view

* and fix missing icons
pull/3994/head
Magdalena Kafka 9 years ago
parent f4df0b124a
commit a6d82e144b
  1. 24
      app/views/users/show.html.erb

@ -83,17 +83,23 @@ See doc/COPYRIGHT.rdoc for more details.
<div id="activity">
<% @events_by_day.keys.sort.reverse.each do |day| %>
<h4><%= format_activity_day(day) %></h4>
<dl>
<ul class="generic-list">
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
<dt class="<%= e.event_type %>">
<%= icon_wrapper("icon-context icon-#{e.event_type}", e.event_name) %>
<span class="time"><%= format_time(e.event_datetime, false) %></span>
<%= content_tag('span', h(e.project), class: 'project') %>
<%= link_to format_activity_title(e.event_title), e.event_url %>
</dt>
<dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd>
<li class="<%= e.event_type %>">
<div class="title">
<% 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) %>
<span class="time"><%= format_time(e.event_datetime, false) %></span>
<%= content_tag('span', h(e.project), class: 'project') %>
<%= link_to format_activity_title(e.event_title), e.event_url %>
</div>
<div class="description">
<%= format_activity_description(e.event_description) %>
</div>
</li>
<% end -%>
</dl>
</ul>
<% end -%>
</div>

Loading…
Cancel
Save