mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 13:16:28 +08:00
bac0455435
This commit also: * fixes a bug in permission_helper.rb, * fixes comments.js a bit, * adds 2 more re-renders of dropdown position calculations to canvas.js and projects/index.js.
15 lines
534 B
Text
15 lines
534 B
Text
<% day = 366 %>
|
|
<% 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 and 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 'step_comments/comment.html.erb', comment: comment %>
|
|
</li>
|
|
<% end %>
|