2016-07-28 22:41:10 +08:00
|
|
|
<h5 class="text-center"><%= t('experiments.canvas.popups.comments_tab') %></h5>
|
2016-02-12 23:52:43 +08:00
|
|
|
<hr>
|
|
|
|
<ul class="no-style double-line content-comments">
|
|
|
|
<% if @comments.size == 0 then %>
|
2016-07-28 22:41:10 +08:00
|
|
|
<li class="no-comments"><em><%= t 'experiments.canvas.popups.no_comments' %></em></li>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% else %>
|
|
|
|
<%= render 'my_module_comments/list.html.erb', comments: @comments %>
|
|
|
|
<% end %>
|
|
|
|
<% if @comments.length == @per_page %>
|
|
|
|
<li class="text-center">
|
|
|
|
<a class="btn btn-default btn-more-comments" href="<%= more_comments_url %>" data-remote="true">
|
2016-07-28 22:41:10 +08:00
|
|
|
<%=t "experiments.canvas.popups.more_comments" %>
|
2016-02-12 23:52:43 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<% if can_add_comment_to_module(@my_module) %>
|
|
|
|
<ul class="no-style double-line">
|
|
|
|
<li>
|
|
|
|
<hr>
|
|
|
|
<%= bootstrap_form_for :comment, url: { format: :json }, method: :post, remote: true do |f| %>
|
2016-07-28 22:41:10 +08:00
|
|
|
<%= f.text_field :message, hide_label: true, placeholder: t("experiments.canvas.popups.comment_placeholder"), append: f.submit("+"), help: '.' %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|