mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 15:13:21 +08:00
41 lines
1.5 KiB
Text
41 lines
1.5 KiB
Text
<hr>
|
|
<div class="col-xs-12">
|
|
<strong><%= t('protocols.steps.comments_tab') %></strong>
|
|
</div>
|
|
<hr>
|
|
<ul class="no-style double-line content-comments">
|
|
<% if comments.size == per_page %>
|
|
<li class="comment-more text-center">
|
|
<a class="btn btn-default btn-more-comments"
|
|
href="<%= url_for(step_step_comments_path(step, format: :json, from: comments.first.id)) %>"
|
|
data-remote="true">
|
|
<%=t "general.more_comments" %>
|
|
</a>
|
|
</li>
|
|
<% end %>
|
|
<% if comments.size == 0 %>
|
|
<li class="no-comments"><em><%= t 'general.no_comments' %></em></li>
|
|
<% else %>
|
|
<%= render 'step_comments/list.html.erb', comments: comments %>
|
|
<% end %>
|
|
</ul>
|
|
<% if can_create_comments_in_module?(@protocol.my_module) %>
|
|
<ul class="no-style double-line">
|
|
<li>
|
|
<hr>
|
|
<%= bootstrap_form_for :comment,
|
|
url: step_step_comments_path(step, format: :json),
|
|
html: { class: 'comment-form', id: "step-comment-#{step.id}" },
|
|
method: :post,
|
|
remote: true do |f| %>
|
|
<%= f.smart_text_area :message,
|
|
single_line: true,
|
|
hide_label: true,
|
|
placeholder: t("general.comment_placeholder"),
|
|
append: f.submit("+"),
|
|
help: '.',
|
|
data: { 'atwho-edit' => '' } %>
|
|
<% end %>
|
|
</li>
|
|
</ul>
|
|
<% end %>
|