mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Move "orders closed" message to "shop" tab and adjust "home" tab message display logic
This commit is contained in:
@@ -38,8 +38,7 @@ module ShopHelper
|
||||
private
|
||||
|
||||
def show_home_tab?
|
||||
require_customer? || shopfront_closed_message? ||
|
||||
current_distributor.preferred_shopfront_message.present?
|
||||
require_customer? || current_distributor.preferred_shopfront_message.present?
|
||||
end
|
||||
|
||||
def shopfront_closed_message?
|
||||
|
||||
@@ -14,12 +14,6 @@
|
||||
= t '.require_customer_html',
|
||||
{contact: link_to(t('.contact'), '#contact'),
|
||||
enterprise: current_distributor.name}
|
||||
- elsif @order_cycles and @order_cycles.empty?
|
||||
- if current_distributor.preferred_shopfront_closed_message.present?
|
||||
.row
|
||||
.small-12.columns
|
||||
.shopfront_closed_message
|
||||
= current_distributor.preferred_shopfront_closed_message.html_safe
|
||||
- elsif current_distributor.preferred_shopfront_message.present?
|
||||
.row
|
||||
.small-12.columns
|
||||
|
||||
@@ -3,18 +3,6 @@
|
||||
|
||||
%ordercycle{"ng-controller" => "OrderCycleCtrl"}
|
||||
|
||||
- if @order_cycles and @order_cycles.empty?
|
||||
%h4
|
||||
%i.ofn-i_012-warning
|
||||
= t :shopping_oc_closed
|
||||
%p
|
||||
= t :shopping_oc_closed_description
|
||||
.text-right
|
||||
%small
|
||||
%em
|
||||
= render partial: "shopping_shared/next_order_cycle"
|
||||
= render partial: "shopping_shared/last_order_cycle"
|
||||
|
||||
- else
|
||||
- unless @order_cycles and @order_cycles.empty?
|
||||
%form.custom
|
||||
= yield :order_cycle_form
|
||||
|
||||
@@ -1,3 +1,24 @@
|
||||
%script{ type: "text/ng-template", id: "shop/shop.html" }
|
||||
- if @order_cycles and @order_cycles.empty?
|
||||
.content
|
||||
.row
|
||||
%h4
|
||||
%i.ofn-i_012-warning
|
||||
= t :shopping_oc_closed
|
||||
%small
|
||||
%em
|
||||
(
|
||||
= render partial: "shopping_shared/next_order_cycle"
|
||||
= render partial: "shopping_shared/last_order_cycle"
|
||||
)
|
||||
%p
|
||||
= t :shopping_oc_closed_description
|
||||
|
||||
|
||||
- if shopfront_closed_message?
|
||||
.row
|
||||
.shopfront_closed_message
|
||||
= current_distributor.preferred_shopfront_closed_message.html_safe
|
||||
|
||||
- unless require_customer?
|
||||
= render partial: "shop/products/form"
|
||||
|
||||
Reference in New Issue
Block a user