mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-26 16:53:12 +08:00
adds first date to _list.html.erb view
This commit is contained in:
parent
ebd354e4d5
commit
a931a1bc15
1 changed files with 9 additions and 1 deletions
|
@ -1,9 +1,17 @@
|
|||
<% if activities.first_page? && activities.first.created_at.to_date == Date.today %>
|
||||
<% 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) %>
|
||||
|
|
Loading…
Reference in a new issue