Move warning colour definition to CSS

This also changes the orange to red, but that's part of the plan.
This commit is contained in:
David Cook
2023-05-17 12:27:22 +10:00
parent e674c53535
commit dcf857cafb
3 changed files with 11 additions and 4 deletions

View File

@@ -17,18 +17,18 @@
= 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.icon-exclamation-sign{"ofn-with-tip" => t('.payment_methods_tip'), style: "font-size: 16px;color: #DA5354"}
%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.icon-exclamation-sign{"ofn-with-tip" => t('.shipping_methods_tip'), style: "font-size: 16px;color: #DA5354"}
%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.icon-warning-sign{"ofn-with-tip" => t('.enterprise_fees_tip'), style: "font-size: 16px;color: orange"}
%span.warning-icon.icon-warning-sign{"ofn-with-tip" => t('.enterprise_fees_tip')}

View File

@@ -32,7 +32,7 @@
%td= enterprise_form.check_box :visible, {}, 'public', 'hidden'
- if spree_current_user.admin?
%td= enterprise_form.select :owner_id, enterprise.users.map{ |e| [ e.email, e.id ] }, {}, class: "select2 fullwidth"
%td
%td.enterprise-actions
= render 'actions', enterprise: enterprise
- if @enterprises.empty?
%tr

View File

@@ -35,3 +35,10 @@ form[name="enterprise_form"] {
margin-bottom: 1em;
margin-top: 1em;
}
table .enterprise-actions {
.warning-icon {
color: $warning-red;
font-size: 16px;
}
}