mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
23 lines
784 B
Text
23 lines
784 B
Text
<%
|
|
current_day = days_since_1970(DateTime.current)
|
|
%>
|
|
<% if !hide_today && activities.count > 0 && days_since_1970(activities[0].created_at) == current_day %>
|
|
<li class="text-center activity-date-item">
|
|
<span class="label label-primary">
|
|
<%=t "activities.index.today" %>
|
|
</span>
|
|
</li>
|
|
<% end %>
|
|
<% activities.each do |activity| %>
|
|
<% activity_day = days_since_1970(activity.created_at) %>
|
|
|
|
<% if activity_day < current_day and activity_day < day %>
|
|
<% day = days_since_1970(activity.created_at) %>
|
|
<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 %>
|