mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 15:13:21 +08:00
27 lines
1.1 KiB
Text
27 lines
1.1 KiB
Text
<div class="comments-container" data-object-id = <%= object.id %>>
|
|
<% per_page = Constants::COMMENTS_SEARCH_LIMIT %>
|
|
<div class="content-comments inline_scroll_block">
|
|
<% if comments.size == per_page %>
|
|
<div class="comment-more text-center">
|
|
<a class="btn btn-default btn-more-comments-new"
|
|
href="<%= more_url %>"
|
|
data-remote="true">
|
|
<%=t "general.more_comments" %>
|
|
</a>
|
|
</div>
|
|
<% end %>
|
|
<div class="comments-list">
|
|
<%= render partial: 'shared/comments/list.html.erb', locals: { comments: comments} %>
|
|
<% comments.mark_as_seen_by(current_user, object) %>
|
|
</div>
|
|
</div>
|
|
<% if can_create_comments %>
|
|
<div class="new-message-container" data-create-url="<%= create_url %>">
|
|
<%= text_area_tag 'message', '', placeholder: t('general.comment_placeholder_new'),
|
|
class: 'form-control smart-text-area textarea-sm',
|
|
data: { 'atwho-edit' => '' } %>
|
|
<i class="fas fa-paper-plane new-comment-button"></i>
|
|
<span class="new-message-error"></span>
|
|
</div>
|
|
<% end %>
|
|
</div>
|