scinote-web/app/views/project_comments/_index.html.erb
Luka Murn 15c0baeee8 Add delete project comment functionality
This commit also removes the old code from @bberic.
2016-08-25 13:51:30 +02:00

26 lines
980 B
Plaintext

<h5 class="text-center"><%= t('projects.index.comment_tab') %></h5>
<hr>
<ul class="no-style double-line content-comments">
<% 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 %>
<% 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 %>
</ul>
<% if can_add_comment_to_project(@project) %>
<ul class="no-style double-line">
<li>
<hr>
<%= bootstrap_form_for :comment, url: {format: :json}, method: :post, remote: true do |f| %>
<%= f.text_field :message, hide_label: true, placeholder: t('projects.index.comment_placeholder'), append: f.submit('+'), help: '.' %>
<% end %>
</li>
</ul>
<% end %>