<% admin_breadcrumb(link_to plural_resource_name(Spree::Product), spree.admin_products_path) %> <% content_for :page_title do %> <%= I18n.t("spree.reviews") %> <% end %> <% content_for :table_filter_title do %> <%= I18n.t("spree.search") %> <% end %> <% content_for :table_filter do %>
<%= search_form_for [:admin, @search] do |f| %>
<%= f.label :name_cont, I18n.t("spree.user") %>
<%= f.text_field :name_cont, class: 'fullwidth' %>
<%= f.label :title_cont, I18n.t("spree.title") -%>
<%= f.text_field :title_cont, class: 'fullwidth' -%>
<%= f.label :review_cont, I18n.t("spree.review") -%>
<%= f.text_field :review_cont, class: 'fullwidth' -%>
<%= f.label :approved_eq, I18n.t("spree.approval_status")-%>
<%= f.select :approved_eq, [ [I18n.t("spree.all"), nil], [I18n.t("spree.approved_reviews"), true], [I18n.t("spree.unapproved_reviews"), false] ], {}, class: 'select2 fullwidth' -%>
<%= button_tag I18n.t("spree.search") %>
<%- end -%>
<%- end -%> <%= paginate @reviews, theme: "solidus_admin" %> <% if @reviews.any? %> <%- @reviews.each do |review| -%> <% end %>
<%= I18n.t("spree.product") %> <%= "#{Spree::Review.human_attribute_name(:rating)}/#{I18n.t("spree.feedback")}" %> <%= I18n.t("spree.verified_purchaser") %> <%= Spree::Review.human_attribute_name(:user) %> <%= Spree::Review.human_attribute_name(:created_at) %> <%= Spree::Review.human_attribute_name(:images) %>
<% if review.product %> <%= link_to review.product.name, product_path(review.product) %> <% end %> <%= txt_stars(review.rating) %>
<%= link_to "(#{review.feedback_stars}/#{review.feedback_reviews.size})", admin_review_feedback_reviews_path(review) %>
<% if review.verified_purchaser? %> <%= solidus_icon('fa fa-check') %> <% end %> <%= review.user_id ? link_to(review.user.try(:email), [:admin, review.user]) : I18n.t("spree.anonymous") %>

<%= Spree::Review.human_attribute_name(:ip_address) %>: <%= review.ip_address ? link_to(review.ip_address, "http://whois.domaintools.com/#{review.ip_address}") : '-' %>

<%= l review.created_at, format: :short %> <% review.images.each do |image| %> <%= link_to image_tag(image.url(:product)), image.url(:original) %> <% end %> <%= link_to_with_icon 'ok', I18n.t("spree.approve"), approve_admin_review_url(review), no_text: true, class: 'approve' unless review.approved %> <%= link_to_edit review, no_text: true, class: 'edit' %> <%= link_to_delete review, no_text: true %>
<% else %>
<%= I18n.t("spree.no_results") %>
<% end %> <%= paginate @reviews, theme: "solidus_admin" -%>