<% content_for :page_title do %> <%= plural_resource_name(Spree::ShippingMethod) %> <% end %> <% content_for :page_actions do %> <%= button_link_to Spree.t(:new_shipping_method), new_object_url, class: "btn-success", icon: 'add.svg', id: 'admin_new_shipping_method_link' %> <% end if can? :create, Spree::ShippingMethod %> <% if @shipping_methods.any? %>
<% @shipping_methods.includes(:zones, :calculator).each do |shipping_method| %> <% end %>
<%= Spree.t(:name) %> <%= Spree.t(:zone) %> <%= Spree.t(:calculator) %> <%= Spree.t(:display) %>
<%= shipping_method.admin_name + ' / ' if shipping_method.admin_name.present? %><%= shipping_method.name %> <% shipping_method.zones.each do |zone| %> <%= link_to zone.name, spree.edit_admin_zone_path(zone) %> <% end %> <%= shipping_method.calculator.description %> <%= shipping_method.display_on.blank? ? Spree.t(:none) : Spree.t(shipping_method.display_on) %> <%= link_to_edit(shipping_method, no_text: true) if can? :edit, shipping_method %> <%= link_to_delete(shipping_method, no_text: true) if can? :delete, shipping_method %>
<% else %>
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::ShippingMethod)) %>, <%= link_to(Spree.t(:add_one), new_object_url) if can? :create, Spree::PaymentMethod %>!
<% end %>