activities.html.erb
1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<%= block_title(block.view_title, block.subtitle) %>
<div class="recent-activities-block">
<% unless block.activities.size == 0 %>
<ul>
<% block.activities.each do |activity| %>
<li class="recent-activity-<%= activity.label %>">
<p class="recent-activity-date">
<% if activity.label === 'events' %>
<%=
_('Event on <b>%s</b> at %s - %s').html_safe %
[
l(activity.target.start_date, format: :medium),
activity.target.start_date.strftime("%H:%M"),
link_to(activity.user.name, activity.user.url)
]
%>
<% else %>
<%=
_('On <b>%s</b> at %s - %s').html_safe %
[
l(activity.created_at, format: :medium),
activity.created_at.strftime("%H:%M"),
link_to(activity.user.name, activity.user.url)
]
%>
<% end %>
<span class="recent-activity-label"><%= activity.label %></span>
</p>
<% if activity.label === 'events' %>
<%= image_tag(activity.params['first_image']) %>
<p class="lead"><b><%= activity.params['name'] %></b><br /><%= strip_tags(activity.params['lead']) %></p>
<br style="clear: both;" />
<% else %>
<p><%= describe(activity).html_safe %></p>
<% end %>
</li>
<% end %>
</ul>
<% else %>
<div class="recent-activities-block-none"><%= c_('None') %></div>
<% end %>
</div>