2016-02-12 23:52:43 +08:00
|
|
|
<%
|
|
|
|
day = 366
|
|
|
|
current_day = DateTime.current.strftime('%j').to_i
|
|
|
|
%>
|
|
|
|
<% comments.each do |comment| %>
|
|
|
|
<%
|
|
|
|
comment_day = comment.created_at.strftime('%j').to_i
|
|
|
|
|
2016-08-24 21:45:49 +08:00
|
|
|
if comment_day < current_day and comment_day < day then
|
2016-02-12 23:52:43 +08:00
|
|
|
day = comment.created_at.strftime('%j').to_i
|
|
|
|
%>
|
2016-08-24 21:45:49 +08:00
|
|
|
<li class="comment-date-separator">
|
|
|
|
<p class="text-center"><%= comment.created_at.strftime('%d.%m.%Y') %></p>
|
|
|
|
</li>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% end %>
|
2016-08-24 21:45:49 +08:00
|
|
|
<li class="comment">
|
|
|
|
<%= render 'project_comments/comment.html.erb', comment: comment %>
|
|
|
|
</li>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% end %>
|