<% content_for :page_title do %> <%= Spree.t('admin.navigation.menus') %> <% end %> <% content_for :page_actions do %> <%= button_link_to Spree.t('admin.navigation.add_new_menu'), new_object_url, { class: "btn-success", icon: 'add.svg', id: 'new_menu' } %> <% end if can?(:create, Spree::Menu) %> <% content_for :table_filter do %>
<%= search_form_for [:admin, @search] do |f| %> <%- locals = {f: f} %>
<%= f.label :name_cont, Spree.t('name') %> <%= f.text_field :name_cont, size: 15, class: "form-control js-quick-search-target js-filterable" %>
<%= label_tag :q_location_eq, Spree.t(:location) %><%= f.select :location_eq, spree_humanize_dropdown_values('Spree::Menu', { const: 'MENU_LOCATIONS', paramterize_values: true }), { include_blank: true }, class: 'select2-clear js-filterable' %>
<%= label_tag :q_locale_eq, Spree.t(:language) %> <%= f.select :locale_eq, all_locales_options, { include_blank: true }, class: 'select2-clear js-filterable' %>
<%= button Spree.t(:search), 'search.svg' %>
<% end %>
<% end %> <% if @menus.any? %>
<% @menus.each do |menu| %> <% end %>
<%= render 'spree/admin/shared/index_table_options', collection: @menus, simple: true %> <% else %>
<%= Spree.t('admin.navigation.you_have_no_menus') %>
<% end %>