2016-09-20 23:06:07 +08:00
|
|
|
<hr>
|
2016-09-29 22:43:19 +08:00
|
|
|
<div class="col-xs-12">
|
|
|
|
<strong><%= t('my_modules.results.comments_tab') %></strong>
|
|
|
|
</div>
|
2016-02-12 23:52:43 +08:00
|
|
|
<hr>
|
|
|
|
<ul class="no-style double-line content-comments">
|
|
|
|
<% if @comments.length == @per_page %>
|
2016-08-25 17:45:13 +08:00
|
|
|
<li class="comment-more text-center">
|
2016-02-12 23:52:43 +08:00
|
|
|
<a class="btn btn-default btn-more-comments" href="<%= more_comments_url %>" data-remote="true">
|
|
|
|
<%=t "general.more_comments" %>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
2016-09-20 23:06:07 +08:00
|
|
|
<% 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 %>
|
2016-02-12 23:52:43 +08:00
|
|
|
</ul>
|
2018-02-16 01:46:29 +08:00
|
|
|
<% if can_create_comments_in_module?(@my_module) then %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<ul class="no-style double-line">
|
|
|
|
<li>
|
|
|
|
<hr>
|
2016-11-08 18:29:55 +08:00
|
|
|
<%= bootstrap_form_for :comment, url: { format: :json }, method: :post, remote: true, html: { class: 'comment-form' } do |f| %>
|
2017-01-05 17:52:00 +08:00
|
|
|
<%= f.smart_text_area :message,
|
|
|
|
single_line: true,
|
|
|
|
hide_label: true,
|
|
|
|
placeholder: t("general.comment_placeholder"),
|
2017-05-11 22:54:28 +08:00
|
|
|
append: f.submit("+",
|
|
|
|
onclick: "Results.processResult(event, Results.ResultTypeEnum.COMMENT, false);"),
|
2017-01-05 17:52:00 +08:00
|
|
|
help: '.',
|
2017-01-11 21:56:47 +08:00
|
|
|
data: { 'atwho-edit' => '' } %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|