2019-04-20 16:59:59 +08:00
|
|
|
<% if can_read_protocol_in_module?(@protocol) %>
|
|
|
|
|
|
|
|
<div class="col-xs-12 comments-title">
|
|
|
|
<h4>
|
|
|
|
<%=t('protocols.steps.comments') %>
|
2019-06-04 20:40:21 +08:00
|
|
|
(<span id="comment-counter-<%= step.id %>"><%= comments_count %></span>)
|
2019-04-20 16:59:59 +08:00
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
|
2019-06-04 20:40:21 +08:00
|
|
|
<%= render partial: 'shared/comments/comments.html.erb', locals: {
|
|
|
|
object: step,
|
2021-09-14 17:08:35 +08:00
|
|
|
comments: comments,
|
2023-03-22 19:52:08 +08:00
|
|
|
can_create_comments: can_create_comments_in_my_module_steps?(@protocol.my_module),
|
2019-06-04 20:40:21 +08:00
|
|
|
create_url: step_step_comments_path(step, format: :json),
|
|
|
|
more_url: step_step_comments_path(step, format: :json, from: comments.first&.id)
|
|
|
|
} %>
|
2019-04-20 16:59:59 +08:00
|
|
|
<% end %>
|