Move admin header partial to a component
This way it's easier to refactor it. Note we're using `with_request_url` in the tests because the component renders the locale switcher, which needs a URL in order to work. This doesn't affect whether we're in the management section or not.
This commit is contained in:
@@ -3,16 +3,6 @@ module AdminHelper
|
||||
"/#{namespace}"
|
||||
end
|
||||
|
||||
def namespaced_header_title
|
||||
if namespace == "moderation/budgets"
|
||||
t("moderation.header.title")
|
||||
elsif namespace == "management"
|
||||
t("management.dashboard.index.title")
|
||||
else
|
||||
t("#{namespace}.header.title")
|
||||
end
|
||||
end
|
||||
|
||||
def official_level_options
|
||||
options = [["", 0]]
|
||||
(1..5).each do |i|
|
||||
|
||||
Reference in New Issue
Block a user