From e37fedc4357cdd7520cb3e78a6b50c1fb295dfea Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 23 Sep 2020 16:42:00 +1000 Subject: [PATCH] Add bulk ribbon to bulk products --- .../stylesheets/darkswarm/_shop-product-thumb.scss | 12 ++++++++++++ app/views/shop/products/_summary.html.haml | 2 ++ config/locales/en.yml | 1 + 3 files changed, 15 insertions(+) diff --git a/app/assets/stylesheets/darkswarm/_shop-product-thumb.scss b/app/assets/stylesheets/darkswarm/_shop-product-thumb.scss index 6b7daae559..9a2140b2bf 100644 --- a/app/assets/stylesheets/darkswarm/_shop-product-thumb.scss +++ b/app/assets/stylesheets/darkswarm/_shop-product-thumb.scss @@ -12,6 +12,18 @@ @include breakpoint(phablet) { width: calc(33.333%); } + + // Make this an anchor for the bulk label. + position: relative; + + .product-thumb__bulk-label { + background-color: $grey-700; + color: white; + position: absolute; + right: 0; + top: .8em; + padding: .25em .5em; + } } } } diff --git a/app/views/shop/products/_summary.html.haml b/app/views/shop/products/_summary.html.haml index 1263bebb7d..611abaa0ff 100644 --- a/app/views/shop/products/_summary.html.haml +++ b/app/views/shop/products/_summary.html.haml @@ -1,5 +1,7 @@ .product-thumb %a{"ng-click" => "triggerProductModal()"} + %span.product-thumb__bulk-label{"ng-if" => "::product.group_buy"} + = t("products_bulk") %img{"ng-src" => "{{::product.primaryImageOrMissing}}"} .summary diff --git a/config/locales/en.yml b/config/locales/en.yml index 4755315143..cb74592d18 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1704,6 +1704,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using products_updating_cart: "Updating cart..." products_cart_empty: "Cart empty" products_edit_cart: "Edit your cart" + products_bulk: "Bulk" products_from: from products_change: "No changes to save." products_update_error: "Saving failed with the following error(s):"