scinote-web/app/views/steps/_comments.html.erb

18 lines
594 B
Plaintext
Raw Normal View History

<% if can_read_protocol_in_module?(@protocol) %>
<div class="col-xs-12 comments-title">
<h4>
<%=t('protocols.steps.comments') %>
(<span id="comment-counter-<%= step.id %>"><%= comments_count %></span>)
</h4>
</div>
<%= render partial: 'shared/comments/comments', locals: {
object: step,
comments: comments,
can_create_comments: can_create_comments_in_my_module_steps?(@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)
} %>
<% end %>