From 68908fdff5d280c05809bb52a0fbc640035665f6 Mon Sep 17 00:00:00 2001 From: Sinan Chaush Date: Thu, 2 Dec 2021 11:53:46 +0100 Subject: [PATCH] Navigation is included only for super admin users --- app/views/admin/terms_of_service_files/show.html.haml | 3 ++- app/views/spree/admin/general_settings/edit.html.haml | 3 ++- app/views/spree/admin/payment_methods/edit.html.haml | 3 ++- app/views/spree/admin/payment_methods/index.html.haml | 3 ++- app/views/spree/admin/payment_methods/new.html.haml | 3 ++- app/views/spree/admin/shipping_methods/edit.html.haml | 3 ++- app/views/spree/admin/shipping_methods/index.html.haml | 3 ++- app/views/spree/admin/shipping_methods/new.html.haml | 3 ++- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app/views/admin/terms_of_service_files/show.html.haml b/app/views/admin/terms_of_service_files/show.html.haml index 8f059f0c7c8..94b7633c52a 100644 --- a/app/views/admin/terms_of_service_files/show.html.haml +++ b/app/views/admin/terms_of_service_files/show.html.haml @@ -1,4 +1,5 @@ -= render 'spree/admin/shared/configuration_menu' +- if spree_current_user.admin? + = render 'spree/admin/shared/configuration_menu' - content_for :page_title do = t(".title") diff --git a/app/views/spree/admin/general_settings/edit.html.haml b/app/views/spree/admin/general_settings/edit.html.haml index 7dd4d0e765a..894fa76378a 100644 --- a/app/views/spree/admin/general_settings/edit.html.haml +++ b/app/views/spree/admin/general_settings/edit.html.haml @@ -1,4 +1,5 @@ -= render 'spree/admin/shared/configuration_menu' +- if spree_current_user.admin? + = render 'spree/admin/shared/configuration_menu' - content_for :page_title do = Spree.t(:general_settings) diff --git a/app/views/spree/admin/payment_methods/edit.html.haml b/app/views/spree/admin/payment_methods/edit.html.haml index a7e6af7afab..ca9c2fcd260 100644 --- a/app/views/spree/admin/payment_methods/edit.html.haml +++ b/app/views/spree/admin/payment_methods/edit.html.haml @@ -1,4 +1,5 @@ -= render 'spree/admin/shared/configuration_menu' +- if spree_current_user.admin? + = render 'spree/admin/shared/configuration_menu' - content_for :page_title do = t('.editing_payment_method') diff --git a/app/views/spree/admin/payment_methods/index.html.haml b/app/views/spree/admin/payment_methods/index.html.haml index 3cf6a011e34..1952c60c061 100644 --- a/app/views/spree/admin/payment_methods/index.html.haml +++ b/app/views/spree/admin/payment_methods/index.html.haml @@ -1,4 +1,5 @@ -= render 'spree/admin/shared/configuration_menu' +- if spree_current_user.admin? + = render 'spree/admin/shared/configuration_menu' - content_for :page_title do = t('.payment_methods') diff --git a/app/views/spree/admin/payment_methods/new.html.haml b/app/views/spree/admin/payment_methods/new.html.haml index 05e3e5ebd11..3e55b09794a 100644 --- a/app/views/spree/admin/payment_methods/new.html.haml +++ b/app/views/spree/admin/payment_methods/new.html.haml @@ -1,4 +1,5 @@ -= render 'spree/admin/shared/configuration_menu' +- if spree_current_user.admin? + = render 'spree/admin/shared/configuration_menu' - content_for :page_title do = t('.new_payment_method') diff --git a/app/views/spree/admin/shipping_methods/edit.html.haml b/app/views/spree/admin/shipping_methods/edit.html.haml index 459ecc8dcac..5fdd03b86d7 100644 --- a/app/views/spree/admin/shipping_methods/edit.html.haml +++ b/app/views/spree/admin/shipping_methods/edit.html.haml @@ -1,4 +1,5 @@ -= render 'spree/admin/shared/configuration_menu' +- if spree_current_user.admin? + = render 'spree/admin/shared/configuration_menu' - content_for :page_title do = t('.editing_shipping_method') diff --git a/app/views/spree/admin/shipping_methods/index.html.haml b/app/views/spree/admin/shipping_methods/index.html.haml index 66d6bb7c4a1..1d460042a5f 100644 --- a/app/views/spree/admin/shipping_methods/index.html.haml +++ b/app/views/spree/admin/shipping_methods/index.html.haml @@ -1,4 +1,5 @@ -= render 'spree/admin/shared/configuration_menu' +- if spree_current_user.admin? + = render 'spree/admin/shared/configuration_menu' - content_for :page_title do = t('.shipping_methods') diff --git a/app/views/spree/admin/shipping_methods/new.html.haml b/app/views/spree/admin/shipping_methods/new.html.haml index b4824926337..8e4948157d6 100644 --- a/app/views/spree/admin/shipping_methods/new.html.haml +++ b/app/views/spree/admin/shipping_methods/new.html.haml @@ -1,4 +1,5 @@ -= render 'spree/admin/shared/configuration_menu' +- if spree_current_user.admin? + = render 'spree/admin/shared/configuration_menu' - content_for :page_title do = t('.new_shipping_method')