Rename class to signal intent

Because the HTML is changed, I had to also update the old stylesheet too.
This commit is contained in:
David Cook
2023-12-14 10:14:04 +11:00
committed by drummer83
parent 39d66c082b
commit 3319f38e6c
6 changed files with 18 additions and 18 deletions

View File

@@ -2,12 +2,12 @@
= render 'enterprises_header'
- if @enterprises.empty?
%div.sixteen.columns.alpha.list-item.red
%div.sixteen.columns.alpha.list-item.warning
%span.text.fifteen.columns.alpha
= t "spree_admin_enterprises_none_text"
%span.one.columns.omega
%span.icon-remove-sign
%a.sixteen.columns.alpha.button.bottom.red{ href: "#{main_app.new_admin_enterprise_path}" }
%a.sixteen.columns.alpha.button.bottom.warning{ href: "#{main_app.new_admin_enterprise_path}" }
= t "spree_admin_enterprises_none_create_a_new_enterprise"
%span.icon-arrow-right

View File

@@ -1,4 +1,4 @@
%div.header.sixteen.columns.alpha{ :class => "#{@enterprises.count > 0 ? "" : "red"}"}
%div.header.sixteen.columns.alpha{ :class => "#{@enterprises.count > 0 ? "" : "warning"}"}
%h3.thirteen.columns.alpha
= t "spree_admin_overview_enterprises_header"
- if @enterprises.any?

View File

@@ -1,10 +1,10 @@
- color_class = "red" unless @order_cycle_count > 0
- icon_class = @order_cycle_count > 0 ? "icon-ok-sign" : "icon-warning-sign"
- color_class = "warning" unless @order_cycle_count.positive?
- icon_class = @order_cycle_count.positive? ? "icon-ok-sign" : "icon-warning-sign"
%div.dashboard_item.seven.columns.omega#order_cycles
%div.header.sixteen.columns.alpha{class: color_class}
%h3.ten.columns.alpha
= t ".order_cycles"
- if @order_cycle_count > 0
- if @order_cycle_count.positive?
%a.six.columns.omega.icon-plus.button{ href: main_app.new_admin_order_cycle_path }
= t "spree_admin_enterprises_create_new"
- else

View File

@@ -1,5 +1,5 @@
%div.dashboard_item.seven.columns.alpha#products
%div.header.sixteen.columns.alpha{ :class => "#{@product_count > 0 ? "" : "red"}"}
%div.header.sixteen.columns.alpha{ :class => "#{@product_count > 0 ? "" : "warning"}"}
%h3.ten.columns.alpha
= t "products"
- if @product_count > 0
@@ -19,11 +19,11 @@
= t "spree_admin_enterprises_producers_manage_products"
%span.icon-arrow-right
- else
%div.sixteen.columns.alpha.list-item.red
%div.sixteen.columns.alpha.list-item.warning
%span.thirteen.columns.alpha
= t(".active_products", count: @product_count )
%span.three.columns.omega
%span.icon-remove-sign
%a.sixteen.columns.alpha.button.bottom.red{ href: "#{new_admin_product_path}" }
%a.sixteen.columns.alpha.button.bottom.warning{ href: "#{new_admin_product_path}" }
= t "spree_admin_enterprises_create_new_product"
%span.icon-arrow-right

View File

@@ -18,7 +18,7 @@ div.dashboard_item {
background-color: $spree-green;
}
&.red {
&.warning {
background-color: $color-warning;
}
@@ -39,7 +39,7 @@ div.dashboard_item {
bottom: 5px;
}
&.red {
&.warning {
border-color: $color-warning;
border-width: 3px;
@@ -160,13 +160,13 @@ div.dashboard_item {
border: solid $color-warning;
}
&.red {
&.warning {
color: $color-warning;
border: solid $color-warning;
}
&.orange,
&.red {
&.warning {
border-width: 0px 3px 0px 3px;
}
@@ -224,7 +224,7 @@ div.dashboard_item {
background-color: $spree-blue;
}
&.red {
&.warning {
background-color: $color-warning;
}

View File

@@ -14,7 +14,7 @@ div.dashboard_item {
padding: 0px 6px;
border-radius: 10px;
&.red {
&.warning {
background-color: $color-warning;
}
}
@@ -31,7 +31,7 @@ div.dashboard_item {
bottom: 5px;
}
&.red {
&.warning {
border-color: $color-warning;
border-width: 3px;
@@ -139,7 +139,7 @@ div.dashboard_item {
font-size: 30px;
}
&.red {
&.warning {
color: $color-warning;
border: solid $color-warning;
border-width: 0px 3px 0px 3px;
@@ -184,7 +184,7 @@ div.dashboard_item {
font-weight: bold;
text-align: center;
&.red {
&.warning {
background-color: $color-warning;
}