Files
openfoodnetwork/app/views/spree/admin/shipping_methods/index.html.haml
2018-09-20 14:32:27 +02:00

38 lines
1.4 KiB
Plaintext

- content_for :page_title do
= Spree.t(:shipping_methods)
- content_for :page_actions do
%li
= button_link_to Spree.t(:new_shipping_method), new_object_url, icon: 'icon-plus', id: 'admin_new_shipping_method_link'
- if @shipping_methods.any?
%table#listing_shipping_methods.index
%colgroup
%col{style: "width: 20%"}/
%col{style: "width: 15%"}/
%col{style: "width: 40%"}/
%col{style: "width: 10%"}/
%col{style: "width: 15%"}/
%thead
%tr
%th= Spree.t(:name)
%th= t(:products_distributor)
%th= Spree.t(:zone)
%th= Spree.t(:calculator)
%th= Spree.t(:display)
%th.actions
%tbody
- @shipping_methods.each do |shipping_method|
%tr{class: "#{cycle('odd', 'even')}", id: "#{spree_dom_id shipping_method}"}
%td= shipping_method.name
%td.align-center
- shipping_method.distributors.each do |distributor|
= distributor.name
%br/
%td= shipping_method.zones.collect(&:name).join(", ") if shipping_method.zones
%td= shipping_method.calculator.description
%td.align-center= shipping_method.display_on.blank? ? Spree.t(:both) : Spree.t(shipping_method.display_on)
%td.actions
= link_to_edit shipping_method, no_text: true
= link_to_delete shipping_method, no_text: true
- else
.alpha.twelve.columns.no-objects-found= Spree.t(:no_shipping_methods_found)