Missing navigation for super admin users only included

This commit is contained in:
Sinan Chaush
2021-10-24 22:34:38 +02:00
parent eae134f3b6
commit aedacb1311
10 changed files with 21 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
- if spree_current_user.admin?
= render 'spree/admin/shared/configuration_menu'
= content_for :page_title do
= t('.title')
@@ -29,7 +32,7 @@
%tr{ ng: { repeat: 'enterprise_fee in enterprise_fees | filter:query' } }
%td
= f.ng_hidden_field :id
%ofn-select{ :id => angular_id(:enterprise_id), data: 'enterprises', ng: { model: 'enterprise_fee.enterprise_id' } }
%ofn-select{ :id => angular_id(:enterprise_id), data: 'enterprises', ng: { model: 'enterprise_fee.enterprise_id' }, style: "width: 90%" }
%input{ type: "hidden", name: angular_name(:enterprise_id), ng: { value: "enterprise_fee.enterprise_id" } }
%td= f.ng_select :fee_type, enterprise_fee_type_options, 'enterprise_fee.fee_type'
%td= f.ng_text_field :name, { placeholder: t('.name_placeholder') }

View File

@@ -1,3 +1,5 @@
= render 'spree/admin/shared/configuration_menu'
- content_for :page_title do
= t(".title")

View File

@@ -1,4 +1,4 @@
= render :partial => 'spree/admin/shared/configuration_menu'
= render 'spree/admin/shared/configuration_menu'
- content_for :page_title do
= Spree.t(:general_settings)

View File

@@ -1,3 +1,5 @@
= render 'spree/admin/shared/configuration_menu'
- content_for :page_title do
= t('.editing_payment_method')
%i.icon-arrow-right

View File

@@ -1,3 +1,5 @@
= render 'spree/admin/shared/configuration_menu'
- content_for :page_title do
= t('.payment_methods')

View File

@@ -1,3 +1,5 @@
= render 'spree/admin/shared/configuration_menu'
- content_for :page_title do
= t('.new_payment_method')
- content_for :page_actions do

View File

@@ -1,3 +1,5 @@
= render 'spree/admin/shared/configuration_menu'
- content_for :page_title do
= t('.editing_shipping_method')
- content_for :page_actions do

View File

@@ -1,3 +1,5 @@
= render 'spree/admin/shared/configuration_menu'
- content_for :page_title do
= t('.shipping_methods')
- content_for :page_actions do

View File

@@ -1,3 +1,5 @@
= render 'spree/admin/shared/configuration_menu'
- content_for :page_title do
= t('.new_shipping_method')
- content_for :page_actions do

View File

@@ -6,6 +6,7 @@ describe "spree/admin/payment_methods/index.html.haml" do
include AuthenticationHelper
helper Spree::Admin::NavigationHelper
helper Spree::Admin::BaseHelper
helper Spree::Core::Engine.routes.url_helpers
before do
ActionView::Base.class_eval do
@@ -20,6 +21,7 @@ describe "spree/admin/payment_methods/index.html.haml" do
create(:payment_method),
create(:payment_method)
])
allow(controller).to receive(:controller_name).and_return("tests")
end
describe "payment methods index page" do