Move customizations to more intuitive admin menu section
There were already some menu items to customization pages under the "Site content" menu. It therefore makes sense to move "Custom images" and "Custom content blocks" (which were previously located under "Settings") to "Site content" as well.
This commit is contained in:
@@ -54,15 +54,14 @@ class Admin::MenuComponent < ApplicationComponent
|
||||
end
|
||||
|
||||
def settings?
|
||||
controllers_names = ["settings", "tenants", "tags", "geozones", "images",
|
||||
"content_blocks", "local_census_records", "imports"]
|
||||
controllers_names = ["settings", "tenants", "tags", "geozones", "local_census_records", "imports"]
|
||||
controllers_names.include?(controller_name) &&
|
||||
controller.class.module_parent != Admin::Poll::Questions::Answers
|
||||
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 +255,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 +459,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?)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user