<% content_for :page_title do %> <%= plural_resource_name(Spree::PaymentMethod) %> <% end %> <% content_for :page_actions do %> <%= button_link_to Spree.t(:new_payment_method), new_object_url, class: "btn-success", icon: 'add.svg', id: 'admin_new_payment_methods_link' %> <% end if can? :create, Spree::PaymentMethod %> <% 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" %>
<%= button Spree.t(:search), 'search.svg' %>
<% end %>
<% end %> <% if @payment_methods.any? %>
<% @payment_methods.each do |method| %> <% end %>
<%= Spree.t(:name) %> <%= Spree.t(:provider) %> <%= Spree.t(:display) %> <%= Spree.t(:active) %>
<% if can?(:edit, method) %> <%= svg_icon name: "grip-vertical.svg", width: '18', height: '18' %> <% end %> <%= method.name %> <%= method.type.split('::', 3).last %> <%= Spree.t("admin.display_on.#{method.display_on}") %> <%= active_badge(method.active) %> <%= link_to_edit(method, no_text: true) if can? :edit, method %> <%= link_to_delete(method, no_text: true) if can? :delete, method %>
<% else %>
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::PaymentMethod)) %>, <%= link_to(Spree.t(:add_one), new_object_url) if can? :create, Spree::PaymentMethod %>!
<% end %>