From 0d99656b1be53da2e0da7892c7b65a62d1ba31a8 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Sat, 17 Oct 2020 16:19:45 +0100 Subject: [PATCH] Adjust dashboard layout --- .../stylesheets/admin/dashboard_item.scss | 1 - .../admin/overview/_order_cycles.html.haml | 16 ++++++------- .../spree/admin/overview/_products.html.haml | 24 +++++++++---------- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/app/assets/stylesheets/admin/dashboard_item.scss b/app/assets/stylesheets/admin/dashboard_item.scss index 5cc670a238..38d3e81786 100644 --- a/app/assets/stylesheets/admin/dashboard_item.scss +++ b/app/assets/stylesheets/admin/dashboard_item.scss @@ -66,7 +66,6 @@ div.dashboard_item { a { border-radius: 0px 4px 0px 0px; - margin-left: 8px; height: 100%; padding: 15px 2px 0px 2px; } diff --git a/app/views/spree/admin/overview/_order_cycles.html.haml b/app/views/spree/admin/overview/_order_cycles.html.haml index 0831c50e17..3d26daa37f 100644 --- a/app/views/spree/admin/overview/_order_cycles.html.haml +++ b/app/views/spree/admin/overview/_order_cycles.html.haml @@ -1,21 +1,21 @@ - color_class = @order_cycle_count > 0 ? "blue" : "orange" - icon_class = @order_cycle_count > 0 ? "icon-ok-sign" : "icon-warning-sign" %div.dashboard_item.seven.columns.omega#order_cycles - %div.header.seven.columns.alpha{class: color_class} - %h3.four.columns.alpha + %div.header.sixteen.columns.alpha{class: color_class} + %h3.ten.columns.alpha = t ".order_cycles" - if @order_cycle_count > 0 - %a.three.columns.omega.icon-plus.button.blue{ href: main_app.new_admin_order_cycle_path } + %a.six.columns.omega.icon-plus.button.blue{ href: main_app.new_admin_order_cycle_path } = t "spree_admin_enterprises_create_new" - else %a{ "ofn-with-tip" => t(".order_cycles_tip") } = t "admin.whats_this" - %div.seven.columns.alpha.list - %div.seven.columns.alpha.list-item{class: color_class} - %span.six.columns.alpha + %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) - %span.one.column.omega + %span.three.columns.omega %span{class: icon_class} - %a.seven.columns.alpha.button.bottom{ href: main_app.admin_order_cycles_path, class: color_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 diff --git a/app/views/spree/admin/overview/_products.html.haml b/app/views/spree/admin/overview/_products.html.haml index 539eecd943..3d92aaee85 100644 --- a/app/views/spree/admin/overview/_products.html.haml +++ b/app/views/spree/admin/overview/_products.html.haml @@ -1,29 +1,29 @@ %div.dashboard_item.seven.columns.alpha#products - %div.header.seven.columns.alpha{ :class => "#{@product_count > 0 ? "" : "red"}"} - %h3.four.columns.alpha + %div.header.sixteen.columns.alpha{ :class => "#{@product_count > 0 ? "" : "red"}"} + %h3.ten.columns.alpha = t "products" - if @product_count > 0 - %a.three.columns.omega.icon-plus.button.blue{ href: "#{new_admin_product_path}" } + %a.six.columns.omega.icon-plus.button.blue{ href: "#{new_admin_product_path}" } = t "spree_admin_enterprises_create_new" - else %a{ "ofn-with-tip" => "The products that you sell through the Open Food Network." } = t "admin.whats_this" - %div.seven.columns.alpha.list + %div.sixteen.columns.alpha.list - if @product_count > 0 - %div.seven.columns.alpha.list-item - %span.six.columns.alpha + %div.sixteen.columns.alpha.list-item + %span.thirteen.columns.alpha = t(".active_products", count: @product_count ) - %span.one.column.omega + %span.three.columns.omega %span.icon-ok-sign - %a.seven.columns.alpha.button.bottom.blue{ href: "#{admin_products_path}" } + %a.sixteen.columns.alpha.button.bottom.blue{ href: "#{admin_products_path}" } = t "spree_admin_enterprises_producers_manage_products" %span.icon-arrow-right - else - %div.seven.columns.alpha.list-item.red - %span.six.columns.alpha + %div.sixteen.columns.alpha.list-item.red + %span.thirteen.columns.alpha = t(".active_products", count: @product_count ) - %span.one.column.omega + %span.three.columns.omega %span.icon-remove-sign - %a.seven.columns.alpha.button.bottom.red{ href: "#{new_admin_product_path}" } + %a.eight.columns.alpha.button.bottom.red{ href: "#{new_admin_product_path}" } = t "spree_admin_enterprises_create_new_product" %span.icon-arrow-right