scinote-web/app/views/result_comments/_index.html.erb
Matej Zrimšek e3a7f45fdf Merge branch 'master' into mz_file_upload_and_client_side_upgrade
Conflicts:
	app/assets/javascripts/application.js
	app/views/results/_result_asset.html.erb
	app/views/steps/_step.html.erb
2016-08-26 11:13:40 +02:00

26 lines
1 KiB
Text

<h5 class="text-center"><%= t('my_modules.results.comments_tab') %></h5>
<hr>
<ul class="no-style double-line content-comments">
<% if @comments.size == 0 then %>
<li class="no-comments"><em><%= t 'general.no_comments' %></em></li>
<% else %>
<%= render 'result_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 "general.more_comments" %>
</a>
</li>
<% end %>
</ul>
<% if can_add_result_comment_in_module(@my_module) then %>
<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("general.comment_placeholder"), append: f.submit("+", onclick: "processResult(event, ResultTypeEnum.COMMENT);"), help: '.' %>
<% end %>
</li>
</ul>
<% end %>