2020-11-30 22:55:20 +08:00
|
|
|
<div class="comments-container" data-object-id = <%= object.id %>>
|
2019-06-04 20:40:21 +08:00
|
|
|
<% per_page = Constants::COMMENTS_SEARCH_LIMIT %>
|
2019-06-14 22:20:47 +08:00
|
|
|
<div class="content-comments inline_scroll_block">
|
2019-06-04 20:40:21 +08:00
|
|
|
<% 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} %>
|
2022-08-09 20:15:49 +08:00
|
|
|
<% comments.mark_as_seen_by(current_user, object) %>
|
2019-06-04 20:40:21 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% if can_create_comments %>
|
|
|
|
<div class="new-message-container" data-create-url="<%= create_url %>">
|
2020-11-30 22:55:20 +08:00
|
|
|
<%= text_area_tag 'message', '', placeholder: t('general.comment_placeholder_new'),
|
|
|
|
class: 'form-control smart-text-area textarea-sm',
|
|
|
|
data: { 'atwho-edit' => '' } %>
|
2023-06-08 14:33:37 +08:00
|
|
|
<i class="sn-icon sn-icon-send new-comment-button"></i>
|
2019-06-04 20:40:21 +08:00
|
|
|
<span class="new-message-error"></span>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2020-11-30 22:55:20 +08:00
|
|
|
</div>
|