From b0ff7ca767c34db4325ec58b40bd258d2c38fa84 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Fri, 24 Mar 2017 10:39:35 +1100 Subject: [PATCH] Making accounts page orders listing full-width --- .../stylesheets/darkswarm/account.css.scss | 22 +++++++------ app/views/spree/users/_skinny.html.haml | 16 ++++------ app/views/spree/users/show.html.haml | 32 +++++++++---------- 3 files changed, 36 insertions(+), 34 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/account.css.scss b/app/assets/stylesheets/darkswarm/account.css.scss index 0d44ea1eaa..cae99872d3 100644 --- a/app/assets/stylesheets/darkswarm/account.css.scss +++ b/app/assets/stylesheets/darkswarm/account.css.scss @@ -1,16 +1,14 @@ @import "branding"; @import "mixins"; +.account-summary { + color: #4a4a4a; +} + + .orders { - @include sidepaddingSm; - - @include panepadding; - - padding-top: 10px; - - h3 { - padding-top: 2em; - } + margin-top: 50px; + margin-bottom: 100px; a { color: $clr-brick; @@ -26,6 +24,12 @@ height: auto; } + .active_table_row { + h3 { + margin-top: 0.5em; + } + } + i.ofn-i_059-producer, i.ofn-i_060-producer-reversed { font-size: 3rem; display: inline-block; diff --git a/app/views/spree/users/_skinny.html.haml b/app/views/spree/users/_skinny.html.haml index 4894824296..70ba39d335 100644 --- a/app/views/spree/users/_skinny.html.haml +++ b/app/views/spree/users/_skinny.html.haml @@ -1,12 +1,10 @@ .row.active_table_row.skinny-head.margin-top{"ng-click" => "toggle($event)", "ng-class" => "{'closed' : !open()}"} .columns.small-2 - %span.margin-top - %img.account-logo{"logo-fallback" => true, "ng-src" => "{{distributor.logo}}"} - .columns.small-10.medium-5 - %span.margin-top - %strong{"ng-bind" => "::distributor.name"} - .columns.small-8.small-offset-2.medium-3.text-right - %span.margin-top.distributor-balance{"ng-bind" => "::distributor.balance | formatBalance", "ng-class" => "{'credit' : distributor.balance < 0, 'debit' : distributor.balance > 0, 'paid' : distributor.balance == 0}" } - .columns.small-2.medium-2.text-right - %span.margin-top + %img.margin-top.account-logo{"logo-fallback" => true, "ng-src" => "{{distributor.logo}}"} + .columns.small-5 + %h3.margin-top{"ng-bind" => "::distributor.name"} + .columns.small-4.text-right + %h3.margin-top.distributor-balance{"ng-bind" => "::distributor.balance | formatBalance", "ng-class" => "{'credit' : distributor.balance < 0, 'debit' : distributor.balance > 0, 'paid' : distributor.balance == 0}" } + .columns.small-1.text-right + %h3.margin-top %i{"ng-class" => "{'ofn-i_005-caret-down' : !open(), 'ofn-i_006-caret-up' : open()}"} diff --git a/app/views/spree/users/show.html.haml b/app/views/spree/users/show.html.haml index 0b4800f79e..f99f592459 100644 --- a/app/views/spree/users/show.html.haml +++ b/app/views/spree/users/show.html.haml @@ -3,22 +3,22 @@ .row.pad-top .small-12.columns.pad-top - %h2= accurate_title - .account-summary{"data-hook" => "account_summary"} - = @user.email - (#{link_to t(:edit), spree.edit_account_path}) - %h3= t(:my_orders) + %h2 + = accurate_title + %span.account-summary{"data-hook" => "account_summary"} + = @user.email + (#{link_to t(:edit), spree.edit_account_path}) + .orders{"ng-controller" => "OrdersCtrl", "ng-cloak" => true} - .row - .small-12.columns - .active_table - %distributor.active_table_node.row.animate-repeat{"ng-if" => "Orders.orders_by_distributor.length > 0", "ng-repeat" => "(key, distributor) in Orders.orders_by_distributor", - "ng-controller" => "DistributorNodeCtrl", - "ng-class" => "{'closed' : !open(), 'open' : open(), 'inactive' : !distributor.active}", - id: "{{distributor.hash}}"} - .small-12.columns - = render partial: "spree/users/skinny" - = render partial: "spree/users/fat" - .message{"ng-if" => "Orders.orders_by_distributor.length == 0", "ng-bind" => "::'you_have_no_orders_yet' | t"} + .active_table + %h3.my-orders= t(:my_orders) + %distributor.active_table_node.row.animate-repeat{"ng-if" => "Orders.orders_by_distributor.length > 0", "ng-repeat" => "(key, distributor) in Orders.orders_by_distributor", + "ng-controller" => "DistributorNodeCtrl", + "ng-class" => "{'closed' : !open(), 'open' : open(), 'inactive' : !distributor.active}", + id: "{{distributor.hash}}"} + .small-12.columns + = render partial: "spree/users/skinny" + = render partial: "spree/users/fat" + .message{"ng-if" => "Orders.orders_by_distributor.length == 0", "ng-bind" => "::'you_have_no_orders_yet' | t"} = render partial: "shared/footer"