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?)
|
||||
)
|
||||
|
||||
@@ -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