mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-10 22:25:59 +08:00
start fixing comments dates
This commit is contained in:
parent
91c7d8a952
commit
36fb2713b3
5 changed files with 5 additions and 4 deletions
|
|
@ -63,6 +63,7 @@ var Comments = (function() {
|
||||||
moreBtn.trigger('blur');
|
moreBtn.trigger('blur');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debugger;
|
||||||
// Reposition dropdown comment options
|
// Reposition dropdown comment options
|
||||||
scrollCommentOptions(listItem
|
scrollCommentOptions(listItem
|
||||||
.closest('.content-comments')
|
.closest('.content-comments')
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<% comments.each do |comment| %>
|
<% comments.each do |comment| %>
|
||||||
<% comment_day = comment.created_at.strftime('%j').to_i %>
|
<% comment_day = comment.created_at.strftime('%j').to_i %>
|
||||||
<% if comment_day < current_day && comment_day > day %>
|
<% if comment_day <= current_day && comment_day > day %>
|
||||||
<% day = comment.created_at.strftime('%j').to_i %>
|
<% day = comment.created_at.strftime('%j').to_i %>
|
||||||
<li class="comment-date-separator">
|
<li class="comment-date-separator">
|
||||||
<p class="text-center"><%= comment.created_at.strftime('%d.%m.%Y') %></p>
|
<p class="text-center"><%= comment.created_at.strftime('%d.%m.%Y') %></p>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<% current_day = DateTime.current.strftime('%j').to_i %>
|
<% current_day = DateTime.current.strftime('%j').to_i %>
|
||||||
<% comments.each do |comment| %>
|
<% comments.each do |comment| %>
|
||||||
<% comment_day = comment.created_at.strftime('%j').to_i %>
|
<% comment_day = comment.created_at.strftime('%j').to_i %>
|
||||||
<% if comment_day < current_day && comment_day > day %>
|
<% if comment_day <= current_day && comment_day > day %>
|
||||||
<% day = comment.created_at.strftime('%j').to_i %>
|
<% day = comment.created_at.strftime('%j').to_i %>
|
||||||
<li class="comment-date-separator">
|
<li class="comment-date-separator">
|
||||||
<p class="text-center"><%= comment.created_at.strftime('%d.%m.%Y') %></p>
|
<p class="text-center"><%= comment.created_at.strftime('%d.%m.%Y') %></p>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<% comments.each do |comment| %>
|
<% comments.each do |comment| %>
|
||||||
<% comment_day = comment.created_at.strftime('%j').to_i %>
|
<% comment_day = comment.created_at.strftime('%j').to_i %>
|
||||||
<% if comment_day < current_day && comment_day > day %>
|
<% if comment_day <= current_day && comment_day > day %>
|
||||||
<% day = comment.created_at.strftime('%j').to_i %>
|
<% day = comment.created_at.strftime('%j').to_i %>
|
||||||
<li class="comment-date-separator">
|
<li class="comment-date-separator">
|
||||||
<p class="text-center"><%= comment.created_at.strftime('%d.%m.%Y') %></p>
|
<p class="text-center"><%= comment.created_at.strftime('%d.%m.%Y') %></p>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<% comments.each do |comment| %>
|
<% comments.each do |comment| %>
|
||||||
<% comment_day = comment.created_at.strftime('%j').to_i %>
|
<% comment_day = comment.created_at.strftime('%j').to_i %>
|
||||||
<% if comment_day < current_day && comment_day > day %>
|
<% if comment_day <= current_day && comment_day > day %>
|
||||||
<% day = comment.created_at.strftime('%j').to_i %>
|
<% day = comment.created_at.strftime('%j').to_i %>
|
||||||
<li class="comment-date-separator">
|
<li class="comment-date-separator">
|
||||||
<p class="text-center"><%= comment.created_at.strftime('%d.%m.%Y') %></p>
|
<p class="text-center"><%= comment.created_at.strftime('%d.%m.%Y') %></p>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue