mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 10:06:53 +08:00
26 lines
891 B
Text
26 lines
891 B
Text
<% if activities.first_page? %>
|
|
<% if activities.first.created_at.to_date == Date.today %>
|
|
<li class="text-center activity-date-item">
|
|
<span class="label label-primary">
|
|
<%=t "activities.index.today" %>
|
|
</span>
|
|
</li>
|
|
<% else %>
|
|
<li class="text-center activity-date-item">
|
|
<span class="label label-primary">
|
|
<%= activity-first.created_at.strftime('%d.%m.%Y') %>
|
|
</span>
|
|
</li>
|
|
<% end %>
|
|
<% end %>
|
|
<% activities.each_with_index do |activity, index| %>
|
|
<% prevDate = calculate_previous_date(activities, index, previous_activity_created_at) %>
|
|
<% if activity.created_at.to_date < prevDate %>
|
|
<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 %>
|