<%= render 'spree/admin/shared/configuration_menu' %> <% content_for :page_title do %> <%= Spree.t(:shipping_methods) %> <% end %> <% content_for :page_actions do %> <% if can?(:create, Spree::ShippingMethod) %>
  • <%= button_link_to Spree.t(:new_shipping_method), new_object_url, :icon => 'plus', :id => 'admin_new_shipping_method_link' %>
  • <% end %> <% end %> <% 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.collect(&:name).join(", ") if shipping_method.zones %> <%= shipping_method.calculator.description %> <%= shipping_method.display_on.blank? ? Spree.t(:both) : Spree.t(shipping_method.display_on) %> <% if can?(:update, shipping_method) %> <%= link_to_edit shipping_method, :no_text => true %> <% end %> <% if can?(:destroy, shipping_method) %> <%= link_to_delete shipping_method, :no_text => true %> <% end %>
    <% else %>
    <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/shipping_method')) %> <% if can?(:create, Spree::ShippingMethod) %> <%= link_to Spree.t(:add_one), spree.new_admin_shipping_method_path %>! <% end %>
    <% end %>