mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 21:24:54 +08:00
24 lines
798 B
Text
24 lines
798 B
Text
|
<%
|
||
|
current_day = DateTime.current.strftime('%j').to_i
|
||
|
%>
|
||
|
<% if !hide_today and activities.count > 0 and activities[0].created_at.strftime('%j').to_i == 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 = activity.created_at.strftime('%j').to_i %>
|
||
|
|
||
|
<% if activity_day < current_day and activity_day < day %>
|
||
|
<% day = activity.created_at.strftime('%j').to_i %>
|
||
|
<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 %>
|