mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 14:17:00 +08:00
14 lines
547 B
Text
14 lines
547 B
Text
<% day = 0 %>
|
|
<% current_day = DateTime.current.strftime('%j').to_i %>
|
|
<% comments.each do |comment| %>
|
|
<% comment_day = comment.created_at.strftime('%j').to_i %>
|
|
<% if comment_day <= current_day && comment_day > day %>
|
|
<% day = comment.created_at.strftime('%j').to_i %>
|
|
<li class="comment-date-separator">
|
|
<p class="text-center"><%= comment.created_at.strftime('%d.%m.%Y') %></p>
|
|
</li>
|
|
<% end %>
|
|
<li class="comment">
|
|
<%= render 'project_comments/comment.html.erb', comment: comment %>
|
|
</li>
|
|
<% end %>
|