scinote-web/app/views/project_comments/_index.html.erb

32 lines
1.2 KiB
Plaintext

<h5 class="text-center"><%= t('projects.index.comment_tab') %></h5>
<hr>
<ul class="no-style double-line content-comments">
<% if @comments.length == @per_page %>
<li class="comment-more text-center">
<a class="btn btn-default btn-more-comments" href="<%= more_comments_url %>" data-remote="true">
<%= t'projects.index.more_comments' %></a>
</li>
<% end %>
<% if @comments.size == 0 then %>
<li class="no-comments"><em><%= t 'projects.index.no_comments' %></em></li>
<% else %>
<%= render 'project_comments/list.html.erb', comments: @comments %>
<% end %>
</ul>
<% if can_create_comments_in_project?(@project) %>
<ul class="no-style double-line">
<li>
<hr>
<%= bootstrap_form_for :comment, url: {format: :json}, method: :post, remote: true, html: { class: 'comment-form' } do |f| %>
<%= f.smart_text_area :message,
single_line: true,
hide_label: true,
placeholder: t('projects.index.comment_placeholder'),
append: f.submit('+'),
help: '.',
data: { 'atwho-edit' => '' } %>
<% end %>
</li>
</ul>
<% end %>