From 84c00fe2151032517a27b57d79cacc650992cdcf Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Tue, 21 Apr 2020 15:04:02 +0100 Subject: [PATCH] Remove duplicate conditionals already present in ShopHelper#shop_tabs, when these partials are rendered, these conditions will always be true In the shops partial, by adding the else, we avoid rendering empty space with an empty products list in case the shop is closed --- app/views/shop/_messages.html.haml | 2 +- app/views/shopping_shared/tabs/_shop.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/shop/_messages.html.haml b/app/views/shop/_messages.html.haml index d519c4833a..3b9b6c0ad0 100644 --- a/app/views/shop/_messages.html.haml +++ b/app/views/shop/_messages.html.haml @@ -23,7 +23,7 @@ - if no_open_order_cycles? = render partial: "shop/closed_shop" - - elsif current_distributor.preferred_shopfront_message.present? + - else .content .row .small-12.columns diff --git a/app/views/shopping_shared/tabs/_shop.html.haml b/app/views/shopping_shared/tabs/_shop.html.haml index e288da7260..bb046069a1 100644 --- a/app/views/shopping_shared/tabs/_shop.html.haml +++ b/app/views/shopping_shared/tabs/_shop.html.haml @@ -5,7 +5,7 @@ - if no_open_order_cycles? = render partial: "shop/closed_shop" - - unless require_customer? + - else .row .small-12.columns = render partial: "shop/products/form"