%= render :partial => 'spree/admin/shared/sub_menu/insight' %>
<% content_for :page_title do %>
<%= Spree.t(:heading, type: params[:type].to_s.titleize, scope: :insight) %>
<% end %>
<% content_for :title do %>
<%= Spree.t(:heading, type: params[:type].to_s.titleize, scope: :insight) %>
<% end %>
<%= select_tag :reports, options_for_select(@reports.map { |report_name| [ Spree.t(:title, scope: [:insight, report_name]), report_name, data: { url: admin_insight_url(report_name, report_category: params[:report_category]) }] }.unshift(['Select a report', '', data: { url: admin_insights_url(report_category: params[:report_category]) }, disabled: true]), @report_name || ''), class: 'report-select' %>
<%= content_tag :div, class: 'hidden report-data', data: { report_data: @report_data_json } {} %>
<%= render 'chart' %>
<%= select_tag :per_page, options_for_select(page_selector_options, params[:per_page] || Spree::Config[:records_per_page]), class: 'form-control text-right move-right page-select' %>
<%= link_to '#', class: 'button btn-link', id: 'apply-pagination' do %>
<% end %>
<%= link_to '#', class: 'button btn-link', id: 'remove-pagination' do %>
<% end %>
<%= link_to '#', class: 'button btn-link', id: 'reset' do %>
<% end %>
<%= link_to '#', class: 'button btn-link', id: 'refresh' do %>
<% end %>
<%= link_to "javascript:void(0)", class: "toggle-btn button btn-link", data: { toggle: 'dropdown' } do %>
<% end %>
<%= render partial: 'spree/admin/templates/insights/show', formats: [:template] %>
<%= render partial: 'spree/admin/templates/insights/paginator', formats: [:template] %>
<%= render partial: 'spree/admin/templates/insights/search', formats: [:template] %>