Merge pull request #5251 from dnsos/intuitive-admin-menu-sections
Move customizations to more intuitive admin menu section
This commit is contained in:
@@ -54,15 +54,13 @@ class Admin::MenuComponent < ApplicationComponent
|
||||
end
|
||||
|
||||
def settings?
|
||||
controllers_names = ["settings", "tenants", "tags", "geozones", "images",
|
||||
"content_blocks", "local_census_records", "imports"]
|
||||
controllers_names.include?(controller_name) &&
|
||||
controller.class.module_parent != Admin::Poll::Questions::Answers
|
||||
controllers_names = ["settings", "tenants", "tags", "geozones", "local_census_records", "imports"]
|
||||
controllers_names.include?(controller_name)
|
||||
end
|
||||
|
||||
def customization?
|
||||
["pages", "banners", "information_texts", "documents"].include?(controller_name) ||
|
||||
homepage? || pages?
|
||||
controllers_names = ["pages", "banners", "information_texts", "documents", "images", "content_blocks"]
|
||||
controllers_names.include?(controller_name) || homepage? || pages?
|
||||
end
|
||||
|
||||
def homepage?
|
||||
@@ -256,6 +254,8 @@ class Admin::MenuComponent < ApplicationComponent
|
||||
banners_link,
|
||||
information_texts_link,
|
||||
documents_link,
|
||||
images_link,
|
||||
content_blocks_link,
|
||||
class: ("is-active" if customization? &&
|
||||
controller.class.module_parent != Admin::Poll::Questions::Answers)
|
||||
)
|
||||
@@ -458,8 +458,6 @@ class Admin::MenuComponent < ApplicationComponent
|
||||
tenants_link,
|
||||
tags_link,
|
||||
geozones_link,
|
||||
images_link,
|
||||
content_blocks_link,
|
||||
local_census_records_link,
|
||||
class: ("is-active" if settings?)
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@ describe "Admin custom content blocks", :admin do
|
||||
visit admin_root_path
|
||||
|
||||
within("#side_menu") do
|
||||
click_link "Settings"
|
||||
click_link "Site content"
|
||||
click_link "Custom content blocks"
|
||||
end
|
||||
|
||||
@@ -42,7 +42,7 @@ describe "Admin custom content blocks", :admin do
|
||||
visit admin_root_path
|
||||
|
||||
within("#side_menu") do
|
||||
click_link "Settings"
|
||||
click_link "Site content"
|
||||
click_link "Custom content blocks"
|
||||
end
|
||||
|
||||
@@ -69,7 +69,7 @@ describe "Admin custom content blocks", :admin do
|
||||
visit admin_root_path
|
||||
|
||||
within("#side_menu") do
|
||||
click_link "Settings"
|
||||
click_link "Site content"
|
||||
click_link "Custom content blocks"
|
||||
end
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ describe "Admin custom images", :admin do
|
||||
visit admin_root_path
|
||||
|
||||
within("#side_menu") do
|
||||
click_link "Settings"
|
||||
click_link "Site content"
|
||||
click_link "Custom images"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user