From e9fe66748ac8f9e9fa7fba96891de04b8e193cdd Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 14 Dec 2023 10:03:18 +1100 Subject: [PATCH 01/12] Replace 'orange' class with 'red' It was the same colour anyway --- .../admin/overview/_order_cycles.html.haml | 2 +- .../admin_v3/dashboard/dashboard_item.scss | 26 ------------------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/app/views/spree/admin/overview/_order_cycles.html.haml b/app/views/spree/admin/overview/_order_cycles.html.haml index 3d26daa37f..8ce3ff3d73 100644 --- a/app/views/spree/admin/overview/_order_cycles.html.haml +++ b/app/views/spree/admin/overview/_order_cycles.html.haml @@ -1,4 +1,4 @@ -- color_class = @order_cycle_count > 0 ? "blue" : "orange" +- color_class = @order_cycle_count > 0 ? "blue" : "red" - icon_class = @order_cycle_count > 0 ? "icon-ok-sign" : "icon-warning-sign" %div.dashboard_item.seven.columns.omega#order_cycles %div.header.sixteen.columns.alpha{class: color_class} diff --git a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss index 3316704ef1..17fd5c8015 100644 --- a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss +++ b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss @@ -21,10 +21,6 @@ div.dashboard_item { &.red { background-color: $color-warning; } - - &.orange { - background-color: $color-warning; - } } div.header { @@ -48,15 +44,6 @@ div.dashboard_item { } } - &.orange { - border-color: $color-warning; - border-width: 3px; - - h3 { - color: $color-warning; - } - } - h3.alpha { height: 100%; padding: 10px 5px 0px 3%; @@ -156,18 +143,9 @@ div.dashboard_item { font-size: 30px; } - &.orange { - color: $color-warning; - border: solid $color-warning; - } - &.red { color: $color-warning; border: solid $color-warning; - } - - &.orange, - &.red { border-width: 0px 3px 0px 3px; } @@ -217,10 +195,6 @@ div.dashboard_item { font-weight: bold; text-align: center; - &.orange { - background-color: $color-warning; - } - &.blue { background-color: $spree-blue; } From 6ca98d497acb3b6e25eae582ecd55818c8c3d933 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 14 Dec 2023 10:06:19 +1100 Subject: [PATCH 02/12] Remove unnecessary 'blue' class Buttons are already blue. And we don't want the text to be blue. This resolves #11865 --- app/views/spree/admin/overview/_enterprises.html.haml | 2 +- app/views/spree/admin/overview/_enterprises_header.html.haml | 2 +- app/views/spree/admin/overview/_order_cycles.html.haml | 4 ++-- app/views/spree/admin/overview/_products.html.haml | 4 ++-- app/webpacker/css/admin_v3/dashboard/dashboard_item.scss | 4 ---- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/app/views/spree/admin/overview/_enterprises.html.haml b/app/views/spree/admin/overview/_enterprises.html.haml index e022623928..ed3d93e663 100644 --- a/app/views/spree/admin/overview/_enterprises.html.haml +++ b/app/views/spree/admin/overview/_enterprises.html.haml @@ -27,6 +27,6 @@ %div.sixteen.columns.alpha.list = render partial: 'enterprise_row', collection: @enterprises, as: :enterprise - %a.sixteen.columns.alpha.button.bottom.blue{ href: "#{main_app.admin_enterprises_path}" } + %a.sixteen.columns.alpha.button.bottom{ href: "#{main_app.admin_enterprises_path}" } = t "spree_admin_overview_enterprises_footer" %span.icon-arrow-right diff --git a/app/views/spree/admin/overview/_enterprises_header.html.haml b/app/views/spree/admin/overview/_enterprises_header.html.haml index a189fe40d6..26b501556f 100644 --- a/app/views/spree/admin/overview/_enterprises_header.html.haml +++ b/app/views/spree/admin/overview/_enterprises_header.html.haml @@ -3,7 +3,7 @@ = t "spree_admin_overview_enterprises_header" - if @enterprises.any? - if spree_current_user.can_own_more_enterprises? - %a.three.columns.omega.icon-plus.button.blue.white-bottom{ href: "#{main_app.new_admin_enterprise_path}" } + %a.three.columns.omega.icon-plus.button.white-bottom{ href: "#{main_app.new_admin_enterprise_path}" } = t "spree_admin_enterprises_create_new" - else %a{ "ofn-with-tip" => t('.ofn_with_tip') } diff --git a/app/views/spree/admin/overview/_order_cycles.html.haml b/app/views/spree/admin/overview/_order_cycles.html.haml index 8ce3ff3d73..dcf288df6e 100644 --- a/app/views/spree/admin/overview/_order_cycles.html.haml +++ b/app/views/spree/admin/overview/_order_cycles.html.haml @@ -1,11 +1,11 @@ -- color_class = @order_cycle_count > 0 ? "blue" : "red" +- color_class = @order_cycle_count > 0 ? "" : "red" - icon_class = @order_cycle_count > 0 ? "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 - %a.six.columns.omega.icon-plus.button.blue{ href: main_app.new_admin_order_cycle_path } + %a.six.columns.omega.icon-plus.button{ href: main_app.new_admin_order_cycle_path } = t "spree_admin_enterprises_create_new" - else %a{ "ofn-with-tip" => t(".order_cycles_tip") } diff --git a/app/views/spree/admin/overview/_products.html.haml b/app/views/spree/admin/overview/_products.html.haml index c1e3aa1d11..f797e2b2fd 100644 --- a/app/views/spree/admin/overview/_products.html.haml +++ b/app/views/spree/admin/overview/_products.html.haml @@ -3,7 +3,7 @@ %h3.ten.columns.alpha = t "products" - if @product_count > 0 - %a.six.columns.omega.icon-plus.button.blue{ href: "#{new_admin_product_path}" } + %a.six.columns.omega.icon-plus.button{ href: "#{new_admin_product_path}" } = t "spree_admin_enterprises_create_new" - else %a{ "ofn-with-tip" => t(".products_tip") } @@ -15,7 +15,7 @@ = t(".active_products", count: @product_count ) %span.three.columns.omega %span.icon-ok-sign - %a.sixteen.columns.alpha.button.bottom.blue{ href: "#{admin_products_path}" } + %a.sixteen.columns.alpha.button.bottom{ href: "#{admin_products_path}" } = t "spree_admin_enterprises_producers_manage_products" %span.icon-arrow-right - else diff --git a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss index 17fd5c8015..f64b0a2a7b 100644 --- a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss +++ b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss @@ -195,10 +195,6 @@ div.dashboard_item { font-weight: bold; text-align: center; - &.blue { - background-color: $spree-blue; - } - &.red { background-color: $color-warning; } From e379ee761bc93f1e873d5e11a05c61edfc2ca274 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 14 Dec 2023 10:10:30 +1100 Subject: [PATCH 03/12] Refactor 'positive' and 'zero' methods are preferred in this case. --- app/views/spree/admin/overview/_order_cycles.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/admin/overview/_order_cycles.html.haml b/app/views/spree/admin/overview/_order_cycles.html.haml index dcf288df6e..e47e8332f5 100644 --- a/app/views/spree/admin/overview/_order_cycles.html.haml +++ b/app/views/spree/admin/overview/_order_cycles.html.haml @@ -1,4 +1,4 @@ -- color_class = @order_cycle_count > 0 ? "" : "red" +- color_class = "red" unless @order_cycle_count > 0 - icon_class = @order_cycle_count > 0 ? "icon-ok-sign" : "icon-warning-sign" %div.dashboard_item.seven.columns.omega#order_cycles %div.header.sixteen.columns.alpha{class: color_class} From 39d66c082b86ee88932e99e24f6694b148723188 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 14 Dec 2023 10:12:42 +1100 Subject: [PATCH 04/12] Remove unused green class --- .../css/admin_v3/dashboard/dashboard_item.scss | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss index f64b0a2a7b..5dd144cc05 100644 --- a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss +++ b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss @@ -14,10 +14,6 @@ div.dashboard_item { padding: 0px 6px; border-radius: 10px; - &.green { - background-color: $spree-green; - } - &.red { background-color: $color-warning; } @@ -178,13 +174,6 @@ div.dashboard_item { .icon-ok-sign { color: #fff; } - - .text-icon { - &.green { - color: $spree-green; - background-color: #fff; - } - } } } } From 3319f38e6ca2acb0e81bb0ec77b8048f25464da8 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 14 Dec 2023 10:14:04 +1100 Subject: [PATCH 05/12] Rename class to signal intent Because the HTML is changed, I had to also update the old stylesheet too. --- app/views/spree/admin/overview/_enterprises.html.haml | 4 ++-- .../spree/admin/overview/_enterprises_header.html.haml | 2 +- app/views/spree/admin/overview/_order_cycles.html.haml | 6 +++--- app/views/spree/admin/overview/_products.html.haml | 6 +++--- app/webpacker/css/admin/dashboard_item.scss | 10 +++++----- .../css/admin_v3/dashboard/dashboard_item.scss | 8 ++++---- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/views/spree/admin/overview/_enterprises.html.haml b/app/views/spree/admin/overview/_enterprises.html.haml index ed3d93e663..bef20ba29c 100644 --- a/app/views/spree/admin/overview/_enterprises.html.haml +++ b/app/views/spree/admin/overview/_enterprises.html.haml @@ -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 diff --git a/app/views/spree/admin/overview/_enterprises_header.html.haml b/app/views/spree/admin/overview/_enterprises_header.html.haml index 26b501556f..760043dcfa 100644 --- a/app/views/spree/admin/overview/_enterprises_header.html.haml +++ b/app/views/spree/admin/overview/_enterprises_header.html.haml @@ -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? diff --git a/app/views/spree/admin/overview/_order_cycles.html.haml b/app/views/spree/admin/overview/_order_cycles.html.haml index e47e8332f5..f18ac33299 100644 --- a/app/views/spree/admin/overview/_order_cycles.html.haml +++ b/app/views/spree/admin/overview/_order_cycles.html.haml @@ -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 diff --git a/app/views/spree/admin/overview/_products.html.haml b/app/views/spree/admin/overview/_products.html.haml index f797e2b2fd..861f7cec2c 100644 --- a/app/views/spree/admin/overview/_products.html.haml +++ b/app/views/spree/admin/overview/_products.html.haml @@ -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 diff --git a/app/webpacker/css/admin/dashboard_item.scss b/app/webpacker/css/admin/dashboard_item.scss index 67498fa352..567d1f63e5 100644 --- a/app/webpacker/css/admin/dashboard_item.scss +++ b/app/webpacker/css/admin/dashboard_item.scss @@ -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; } diff --git a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss index 5dd144cc05..4e7fe00024 100644 --- a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss +++ b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss @@ -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; } From dddebae56a9c2b5e88ed410408d77dc4d703d1b7 Mon Sep 17 00:00:00 2001 From: drummer83 Date: Sun, 24 Dec 2023 17:52:21 +0100 Subject: [PATCH 06/12] Unify coding style --- app/views/spree/admin/overview/_order_cycles.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/admin/overview/_order_cycles.html.haml b/app/views/spree/admin/overview/_order_cycles.html.haml index f18ac33299..90760932dd 100644 --- a/app/views/spree/admin/overview/_order_cycles.html.haml +++ b/app/views/spree/admin/overview/_order_cycles.html.haml @@ -13,7 +13,7 @@ %div.sixteen.columns.alpha.list %div.sixteen.columns.alpha.list-item{class: color_class} %span.thirteen.columns.alpha - = t('.you_have_active', count: @order_cycle_count) + = t(".you_have_active", count: @order_cycle_count) %span.three.columns.omega %span{class: icon_class} %a.sixteen.columns.alpha.button.bottom{ href: main_app.admin_order_cycles_path, class: color_class } From ddd455a73eedaaf1bd7c08e2e590e615c6cb8e15 Mon Sep 17 00:00:00 2001 From: drummer83 Date: Sun, 24 Dec 2023 17:58:21 +0100 Subject: [PATCH 07/12] Use methodology from order_cycles for products --- .../spree/admin/overview/_products.html.haml | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/app/views/spree/admin/overview/_products.html.haml b/app/views/spree/admin/overview/_products.html.haml index 861f7cec2c..3edbdc4e90 100644 --- a/app/views/spree/admin/overview/_products.html.haml +++ b/app/views/spree/admin/overview/_products.html.haml @@ -1,29 +1,26 @@ +- color_class = "warning" unless @product_count.positive? +- icon_class = @product_count.positive? ? "icon-ok-sign" : "icon-remove-sign" %div.dashboard_item.seven.columns.alpha#products - %div.header.sixteen.columns.alpha{ :class => "#{@product_count > 0 ? "" : "warning"}"} + %div.header.sixteen.columns.alpha{class: color_class} %h3.ten.columns.alpha = t "products" - - if @product_count > 0 - %a.six.columns.omega.icon-plus.button{ href: "#{new_admin_product_path}" } + - if @product_count.positive? + %a.six.columns.omega.icon-plus.button{ href: new_admin_product_path } = t "spree_admin_enterprises_create_new" - else %a{ "ofn-with-tip" => t(".products_tip") } = t "admin.whats_this" %div.sixteen.columns.alpha.list - - if @product_count > 0 - %div.sixteen.columns.alpha.list-item - %span.thirteen.columns.alpha - = t(".active_products", count: @product_count ) - %span.three.columns.omega - %span.icon-ok-sign - %a.sixteen.columns.alpha.button.bottom{ href: "#{admin_products_path}" } + %div.sixteen.columns.alpha.list-item{class: color_class} + %span.thirteen.columns.alpha + = t(".active_products", count: @product_count) + %span.three.columns.omega + %span{class: icon_class} + - if @product_count.positive? + %a.sixteen.columns.alpha.button.bottom{ href: admin_products_path, class: color_class } = t "spree_admin_enterprises_producers_manage_products" %span.icon-arrow-right - else - %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.warning{ href: "#{new_admin_product_path}" } + %a.sixteen.columns.alpha.button.bottom{ href: new_admin_product_path, class: color_class } = t "spree_admin_enterprises_create_new_product" %span.icon-arrow-right From 4e6f43afab06876fe9554ac204da55e7c895cf31 Mon Sep 17 00:00:00 2001 From: drummer83 Date: Sun, 24 Dec 2023 17:59:27 +0100 Subject: [PATCH 08/12] Add styles for hovering and warning --- app/webpacker/css/admin_v3/dashboard/dashboard_item.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss index 4e7fe00024..9c475ce747 100644 --- a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss +++ b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss @@ -186,10 +186,17 @@ div.dashboard_item { &.warning { background-color: $color-warning; + border-color: $color-warning; + + &:focus { + border-color: $color-btn-hover-bg; + } + } &:hover { background-color: $color-btn-hover-bg; + border-color: $color-btn-hover-bg; } &.bottom { From 2ab3efe5de18acdab81def742c0ecd691b418c39 Mon Sep 17 00:00:00 2001 From: drummer83 Date: Sun, 24 Dec 2023 17:59:48 +0100 Subject: [PATCH 09/12] Adjust outline when focusing the overflowing enterprisie list (was red in Firefox) --- app/webpacker/css/admin/dashboard_item.scss | 4 ++++ app/webpacker/css/admin_v3/dashboard/dashboard_item.scss | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/app/webpacker/css/admin/dashboard_item.scss b/app/webpacker/css/admin/dashboard_item.scss index 567d1f63e5..14fe92a07a 100644 --- a/app/webpacker/css/admin/dashboard_item.scss +++ b/app/webpacker/css/admin/dashboard_item.scss @@ -101,6 +101,10 @@ div.dashboard_item { max-height: 250px; overflow-y: auto; overflow-x: hidden; + + &:focus { + outline: none; + } } .list-title { diff --git a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss index 9c475ce747..b0bc2bc44d 100644 --- a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss +++ b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss @@ -85,6 +85,10 @@ div.dashboard_item { max-height: 250px; overflow-y: auto; overflow-x: hidden; + + &:focus { + outline: thin dotted; + } } .list-title { From ad508c36e5768fab67b31ab2dee117aa9475028c Mon Sep 17 00:00:00 2001 From: drummer83 Date: Sun, 24 Dec 2023 18:12:31 +0100 Subject: [PATCH 10/12] Avoid overflow of enterprise list when only few enterprises present --- app/webpacker/css/admin/dashboard_item.scss | 2 +- app/webpacker/css/admin_v3/dashboard/dashboard_item.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/webpacker/css/admin/dashboard_item.scss b/app/webpacker/css/admin/dashboard_item.scss index 14fe92a07a..7522b91836 100644 --- a/app/webpacker/css/admin/dashboard_item.scss +++ b/app/webpacker/css/admin/dashboard_item.scss @@ -125,7 +125,7 @@ div.dashboard_item { .list-item { border: solid $spree-blue; border-width: 0px 1px 0px 1px; - height: 38px; + height: 41px; span.alpha { font-weight: bold; diff --git a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss index b0bc2bc44d..f52b935619 100644 --- a/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss +++ b/app/webpacker/css/admin_v3/dashboard/dashboard_item.scss @@ -109,7 +109,7 @@ div.dashboard_item { .list-item { border: solid $spree-blue; border-width: 0px 1px 0px 1px; - height: 38px; + height: 41px; span.alpha { font-weight: bold; From 120b2c363ded61686c774766748c5a56721ae1bf Mon Sep 17 00:00:00 2001 From: drummer83 Date: Sun, 24 Dec 2023 20:29:41 +0100 Subject: [PATCH 11/12] Fixing indentation error --- .../spree/admin/overview/_order_cycles.html.haml | 6 +++--- .../spree/admin/overview/_products.html.haml | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/spree/admin/overview/_order_cycles.html.haml b/app/views/spree/admin/overview/_order_cycles.html.haml index 90760932dd..642f28ce33 100644 --- a/app/views/spree/admin/overview/_order_cycles.html.haml +++ b/app/views/spree/admin/overview/_order_cycles.html.haml @@ -16,6 +16,6 @@ = t(".you_have_active", count: @order_cycle_count) %span.three.columns.omega %span{class: icon_class} - %a.sixteen.columns.alpha.button.bottom{ href: main_app.admin_order_cycles_path, class: color_class } - = t ".manage_order_cycles" - %span.icon-arrow-right + %a.sixteen.columns.alpha.button.bottom{ href: main_app.admin_order_cycles_path, class: color_class } + = t ".manage_order_cycles" + %span.icon-arrow-right diff --git a/app/views/spree/admin/overview/_products.html.haml b/app/views/spree/admin/overview/_products.html.haml index 3edbdc4e90..d9d3af72d2 100644 --- a/app/views/spree/admin/overview/_products.html.haml +++ b/app/views/spree/admin/overview/_products.html.haml @@ -16,11 +16,11 @@ = t(".active_products", count: @product_count) %span.three.columns.omega %span{class: icon_class} - - if @product_count.positive? - %a.sixteen.columns.alpha.button.bottom{ href: admin_products_path, class: color_class } - = t "spree_admin_enterprises_producers_manage_products" - %span.icon-arrow-right - - else - %a.sixteen.columns.alpha.button.bottom{ href: new_admin_product_path, class: color_class } - = t "spree_admin_enterprises_create_new_product" - %span.icon-arrow-right + - if @product_count.positive? + %a.sixteen.columns.alpha.button.bottom{ href: admin_products_path, class: color_class } + = t "spree_admin_enterprises_producers_manage_products" + %span.icon-arrow-right + - else + %a.sixteen.columns.alpha.button.bottom{ href: new_admin_product_path, class: color_class } + = t "spree_admin_enterprises_create_new_product" + %span.icon-arrow-right \ No newline at end of file From da4dc637e4b3960591dc818c453e074f9ca63f84 Mon Sep 17 00:00:00 2001 From: drummer83 Date: Wed, 27 Dec 2023 09:33:27 +0100 Subject: [PATCH 12/12] Add empty line at end of file --- app/views/spree/admin/overview/_products.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/admin/overview/_products.html.haml b/app/views/spree/admin/overview/_products.html.haml index d9d3af72d2..3f86329664 100644 --- a/app/views/spree/admin/overview/_products.html.haml +++ b/app/views/spree/admin/overview/_products.html.haml @@ -23,4 +23,4 @@ - else %a.sixteen.columns.alpha.button.bottom{ href: new_admin_product_path, class: color_class } = t "spree_admin_enterprises_create_new_product" - %span.icon-arrow-right \ No newline at end of file + %span.icon-arrow-right