2016-02-12 23:52:43 +08:00
|
|
|
<%
|
2017-01-12 21:47:15 +08:00
|
|
|
current_day = days_since_1970(DateTime.current)
|
2016-02-12 23:52:43 +08:00
|
|
|
%>
|
2017-01-12 21:47:15 +08:00
|
|
|
<% if !hide_today and activities.count > 0 and days_since_1970(activities[0].created_at) == current_day %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<li class="text-center activity-date-item">
|
|
|
|
<span class="label label-primary">
|
|
|
|
<%=t "activities.index.today" %>
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% activities.each do |activity| %>
|
2017-01-12 21:47:15 +08:00
|
|
|
<% activity_day = days_since_1970(activity.created_at) %>
|
2016-02-12 23:52:43 +08:00
|
|
|
|
|
|
|
<% if activity_day < current_day and activity_day < day %>
|
2017-01-12 21:47:15 +08:00
|
|
|
<% day = days_since_1970(activity.created_at) %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<li class="text-center activity-date-item">
|
|
|
|
<span class="label label-primary">
|
|
|
|
<%= activity.created_at.strftime('%d.%m.%Y') %>
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<%= render 'activities/activity.html.erb', activity: activity %>
|
|
|
|
<% end %>
|