Files
openfoodnetwork/app/views/admin/enterprises/_actions.html.haml
David Cook dcf857cafb Move warning colour definition to CSS
This also changes the orange to red, but that's part of the plan.
2023-05-26 15:11:23 +10:00

35 lines
1.7 KiB
Plaintext

= link_to_with_icon('icon-edit', t('.edit_profile'), main_app.edit_admin_enterprise_path(enterprise), class: 'edit')
%br/
- if can? :destroy, enterprise
= link_to_delete_enterprise enterprise
%br/
%hr.admin-enterprises-index-admin-actions-divider
- if enterprise.is_primary_producer
= link_to_with_icon 'icon-dashboard', t('.properties'), main_app.admin_enterprise_producer_properties_path(enterprise_id: enterprise)
(#{enterprise.producer_properties.count})
%br/
- if enterprise.is_distributor
- if can?(:admin, Spree::PaymentMethod) && can?(:manage_payment_methods, enterprise)
= link_to_with_icon 'icon-chevron-right', t('.payment_methods'), spree.admin_payment_methods_path(enterprise_id: enterprise.id)
(#{enterprise.payment_methods.count})
- if enterprise.payment_methods.count == 0
%span.warning-icon.icon-exclamation-sign{"ofn-with-tip" => t('.payment_methods_tip')}
%br/
- if can?(:admin, Spree::ShippingMethod) && can?(:manage_shipping_methods, enterprise)
= link_to_with_icon 'icon-plane', t('.shipping_methods'), spree.admin_shipping_methods_path(enterprise_id: enterprise.id)
(#{enterprise.shipping_methods.count})
- if enterprise.shipping_methods.count == 0
%span.warning-icon.icon-exclamation-sign{"ofn-with-tip" => t('.shipping_methods_tip')}
%br/
- if can?(:admin, EnterpriseFee) && can?(:manage_enterprise_fees, enterprise)
= link_to_with_icon 'icon-money', t('.enterprise_fees'), main_app.admin_enterprise_fees_path(enterprise_id: enterprise.id)
(#{enterprise.enterprise_fees.count})
- if enterprise.enterprise_fees.count == 0
%span.warning-icon.icon-warning-sign{"ofn-with-tip" => t('.enterprise_fees_tip')}