<% 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? %>
<% if defined?(Spree::Vendor) %> <% end %> <% @shipping_methods.includes(:zones, :calculator).each do |shipping_method| %> <% if defined?(Spree::Vendor) %> <% end %> <% end %>
<%= Spree.t(:name) %><%= Spree.t(:vendor) %><%= Spree.t(:zone) %> <%= Spree.t(:calculator) %> <%= Spree.t(:display) %>
<%= shipping_method.name %> <% if shipping_method.admin_name.present? %> <%= shipping_method.admin_name %> <% end %> <% if shipping_method.vendor.present? %> <%= link_to shipping_method.vendor.name, spree.admin_vendor_path(shipping_method.vendor_id) %> <% end %> <% shipping_method.zones.each do |zone| %> <%= link_to zone.name, spree.edit_admin_zone_path(zone), class: 'badge badge-pill badge-secondary' %> <% end %> <%= shipping_method.calculator.description %> <% if shipping_method.display_on.blank? %> <%= Spree.t(:none) %> <% else %> <%= Spree.t("admin.display_on.#{shipping_method.display_on}") %> <% end %> <%= 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::ShippingMethod %>!
<% end %>