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,
|
|
|
|
comments: comments,
|
|
|
|
can_create_comments: can_create_comments_in_module?(@protocol.my_module),
|
|
|
|
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 %>
|