% 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? %>
<%= Spree.t(:name) %> | <% if defined?(Spree::Vendor) %><%= Spree.t(:vendor) %> | <% end %><%= Spree.t(:zone) %> | <%= Spree.t(:calculator) %> | <%= Spree.t(:display) %> | |
---|---|---|---|---|---|
<%= shipping_method.name %> <% if shipping_method.admin_name.present? %> <%= shipping_method.admin_name %> <% end %> | <% if defined?(Spree::Vendor) %><% if shipping_method.vendor.present? %> <%= link_to shipping_method.vendor.name, spree.admin_vendor_path(shipping_method.vendor_id) %> <% end %> | <% 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 %> |