From c860ffc176918e8c856a44f6aa5c9cafe503ea21 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley Date: Tue, 31 Oct 2017 13:00:58 +0000 Subject: [PATCH] Adjust use of non-translatable open/closed icons --- .../templates/partials/hub_details.html.haml | 4 ++-- .../templates/partials/producer_details.html.haml | 4 ++-- .../stylesheets/darkswarm/_shop-navigation.css.sass | 2 ++ app/assets/stylesheets/darkswarm/hub_node.css.scss | 10 +++++++++- .../stylesheets/darkswarm/modal-enterprises.css.scss | 7 ------- app/views/producers/_fat.html.haml | 6 +++--- app/views/shopping_shared/_order_cycles.html.haml | 2 +- app/views/shops/_fat.html.haml | 2 +- app/views/shops/_skinny.html.haml | 4 ++-- config/locales/en.yml | 3 +++ 10 files changed, 25 insertions(+), 19 deletions(-) diff --git a/app/assets/javascripts/templates/partials/hub_details.html.haml b/app/assets/javascripts/templates/partials/hub_details.html.haml index e3a0234df1..5fb0c93696 100644 --- a/app/assets/javascripts/templates/partials/hub_details.html.haml +++ b/app/assets/javascripts/templates/partials/hub_details.html.haml @@ -17,8 +17,8 @@ %a.cta-hub{"ng-href" => "{{::enterprise.path}}", "ng-class" => "{primary: enterprise.active, secondary: !enterprise.active}", "ofn-change-hub" => "enterprise"} - %i.ofn-i_033-open-sign{"ng-if" => "::enterprise.active"} - %i.ofn-i_032-closed-sign{"ng-if" => "::!enterprise.active"} .hub-name{"ng-bind" => "::enterprise.name"} + %span{"ng-if" => "::enterprise.active"} ({{'maps_open' | t}}) + %span{"ng-if" => "::!enterprise.active"} ({{'maps_closed' | t}}) .button-address{"ng-bind" => "::[enterprise.address.city, enterprise.address.state_name] | printArray"} / %i.ofn-i_007-caret-right diff --git a/app/assets/javascripts/templates/partials/producer_details.html.haml b/app/assets/javascripts/templates/partials/producer_details.html.haml index cb7ee70482..bca20e44b7 100644 --- a/app/assets/javascripts/templates/partials/producer_details.html.haml +++ b/app/assets/javascripts/templates/partials/producer_details.html.haml @@ -14,7 +14,7 @@ %a.cta-hub{"ng-repeat" => "hub in enterprise.hubs | filter:{id: '!'+enterprise.id} | orderBy:'-active'", "ng-href" => "{{::hub.path}}", "ofn-empties-cart" => "hub", "ng-class" => "::{primary: hub.active, secondary: !hub.active}"} - %i.ofn-i_033-open-sign{"ng-if" => "::hub.active"} - %i.ofn-i_032-closed-sign{"ng-if" => "::!hub.active"} .hub-name{"ng-bind" => "::hub.name"} + %span{"ng-if" => "::hub.active"} ({{'maps_open' | t}}) + %span{"ng-if" => "::!hub.active"} ({{'maps_closed' | t}}) .button-address{"ng-bind" => "::[hub.address.city, hub.address.state_name] | printArray"} diff --git a/app/assets/stylesheets/darkswarm/_shop-navigation.css.sass b/app/assets/stylesheets/darkswarm/_shop-navigation.css.sass index 174935c2ce..288450b015 100644 --- a/app/assets/stylesheets/darkswarm/_shop-navigation.css.sass +++ b/app/assets/stylesheets/darkswarm/_shop-navigation.css.sass @@ -36,6 +36,8 @@ text-align: right p max-width: 400px + h4 i + margin-right: 0.3rem @media all and (max-width: 640px) float: left clear: left diff --git a/app/assets/stylesheets/darkswarm/hub_node.css.scss b/app/assets/stylesheets/darkswarm/hub_node.css.scss index 5df4f68b01..cf0ae9ca46 100644 --- a/app/assets/stylesheets/darkswarm/hub_node.css.scss +++ b/app/assets/stylesheets/darkswarm/hub_node.css.scss @@ -8,6 +8,14 @@ white-space: nowrap; overflow-x: hidden; overflow-y: visible; + + i { + margin-right: 0.5rem; + } + } + + .active_table_row { + line-height: 1rem; } //Generic text link style @@ -30,7 +38,7 @@ //Closed & Open column .open_closed { i { - font-size: 2rem; + font-size: 1.75rem; float: right; margin-left: 0.5rem; } diff --git a/app/assets/stylesheets/darkswarm/modal-enterprises.css.scss b/app/assets/stylesheets/darkswarm/modal-enterprises.css.scss index 7b37c46955..25169ec990 100644 --- a/app/assets/stylesheets/darkswarm/modal-enterprises.css.scss +++ b/app/assets/stylesheets/darkswarm/modal-enterprises.css.scss @@ -160,13 +160,6 @@ color: $clr-brick; } - i.ofn-i_033-open-sign, i.ofn-i_032-closed-sign { - margin-right: 0.1rem; - font-size: 2rem; - padding: 0.15rem 0.25rem 0.35rem 0.25rem; - float: left; - } - .hub-name { margin-top: 0.75rem; margin-bottom: 0.2rem; diff --git a/app/views/producers/_fat.html.haml b/app/views/producers/_fat.html.haml index 8d68a2b84f..61187b2c5b 100644 --- a/app/views/producers/_fat.html.haml +++ b/app/views/producers/_fat.html.haml @@ -1,4 +1,4 @@ -.row.active_table_row{"ng-if" => "open()", "ng-click" => "toggle($event)", "ng-class" => "{'open' : !ofn-i_032-closed-sign()}"} +.row.active_table_row{"ng-if" => "open()", "ng-click" => "toggle($event)", "ng-class" => "{'open' : open()}"} .columns.small-12.medium-7.large-7.fat / Will add in long description available once clean up HTML formatting producer.long_description @@ -77,7 +77,7 @@ %a.cta-hub{"ng-repeat" => "hub in producer.hubs | visible | orderBy:'-active'", "ng-href" => "{{::hub.path}}", "ofn-change-hub" => "hub", "ng-class" => "::{primary: hub.active, secondary: !hub.active}"} - %i.ofn-i_033-open-sign{"ng-if" => "::hub.active"} - %i.ofn-i_032-closed-sign{"ng-if" => "::!hub.active"} + %i.ofn-i_068-shop-reversed{"ng-if" => "::hub.active"} + %i.ofn-i_068-shop-reversed{"ng-if" => "::!hub.active"} .hub-name{"ng-bind" => "::hub.name"} .button-address{"ng-bind" => "::[hub.address.city, hub.address.state_name] | printArray"} diff --git a/app/views/shopping_shared/_order_cycles.html.haml b/app/views/shopping_shared/_order_cycles.html.haml index 0e18d3cfc7..99483d9a19 100644 --- a/app/views/shopping_shared/_order_cycles.html.haml +++ b/app/views/shopping_shared/_order_cycles.html.haml @@ -4,7 +4,7 @@ - if @order_cycles and @order_cycles.empty? %h4 - %i.ofn-i_032-closed-sign + %i.ofn-i_012-warning = t :shopping_oc_closed %p = t :shopping_oc_closed_description diff --git a/app/views/shops/_fat.html.haml b/app/views/shops/_fat.html.haml index d5703f84d8..beb882c4d4 100644 --- a/app/views/shops/_fat.html.haml +++ b/app/views/shops/_fat.html.haml @@ -1,4 +1,4 @@ -.row.active_table_row{"ng-show" => "open()", "ng-click" => "toggle($event)", "ng-class" => "{'open' : !ofn-i_032-closed-sign()}"} +.row.active_table_row{"ng-show" => "open()", "ng-click" => "toggle($event)", "ng-class" => "{'open' : open()}"} .columns.small-12.medium-6.large-5.fat %div{"ng-if" => "::hub.taxons"} %label diff --git a/app/views/shops/_skinny.html.haml b/app/views/shops/_skinny.html.haml index fbc008a5c6..a6603236e1 100644 --- a/app/views/shops/_skinny.html.haml +++ b/app/views/shops/_skinny.html.haml @@ -12,7 +12,7 @@ .columns.small-4.medium-3.large-3.text-right{"ng-if" => "::hub.active"} %a.hub.open_closed{"ng-href" => "{{::hub.path}}", "ng-class" => "{primary: hub.active, secondary: !hub.active}", "ofn-change-hub" => "hub"} - %i.ofn-i_033-open-sign + %i.ofn-i_068-shop-reversed %span.margin-top{ ng: { if: "::current()" } } %em= t :hubs_shopping_here %span.margin-top{ ng: { if: "::!current()" } } @@ -20,11 +20,11 @@ .columns.small-4.medium-3.large-3.text-right{"ng-if" => "::!hub.active"} %a.hub.open_closed{"ng-href" => "{{::hub.path}}", "ng-class" => "{primary: hub.active, secondary: !hub.active}", "ofn-change-hub" => "hub"} - %i.ofn-i_032-closed-sign %span.margin-top{ ng: { if: "::current()" } } %em= t :hubs_shopping_here %span.margin-top{ ng: { if: "::!current()" } } = t :hubs_orders_closed + %i.ofn-i_068-shop-reversed .columns.small-2.medium-1.large-1.text-right %span.margin-top diff --git a/config/locales/en.yml b/config/locales/en.yml index ec85efccd2..7ebaf282b9 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1129,6 +1129,9 @@ See the %{link} to find out more about %{sitename}'s features and to start using enterprises_ready_for: "Ready for" enterprises_choose: "Choose when you want your order:" + maps_open: "Open" + maps_closed: "Closed" + hubs_buy: "Shop for:" hubs_shopping_here: "Shopping here" hubs_orders_closed: "Orders closed"