<% if commentable.comments.any? %> <%= render 'spree/admin/shared/comment_list', :commentable => commentable %> <% else %>
<%= Spree.t(:no_resource_found, resource: I18n.t(:comments, scope: 'spree')) %>
<% end %>
<%= form_for(:comment, :url => admin_comments_url) do |f| %> <%= hidden_field_tag 'comment[commentable_id]', commentable.id %> <%= hidden_field_tag 'comment[commentable_type]', commentable.class %> <%= hidden_field_tag 'comment[user_id]', spree_current_user.id %>
<%= Spree.t(:add_comment) %>
<% if @comment_types.present? %>
<%= f.label :comment_type_id, Spree.t(:type) %> <%= f.select :comment_type_id, @comment_types.map{|ct| [ct.name, ct.id]},{} ,:class => 'fullwidth' %>
<% end %>
<%= f.label :comment, Spree.t(:comment) %> <%= f.text_area :comment, :style => 'height:150px;', :class => 'fullwidth' %>
<%= button Spree.t(:add_comment), 'icon-arrow-right' %>
<% end %>