Add sdg manager section to admin profile section
This commit is contained in:
@@ -96,6 +96,7 @@
|
|||||||
moderators_link,
|
moderators_link,
|
||||||
valuators_link,
|
valuators_link,
|
||||||
managers_link,
|
managers_link,
|
||||||
|
(sdg_managers_link if feature?(:sdg)),
|
||||||
users_link,
|
users_link,
|
||||||
class: ("is-active" if profiles?)
|
class: ("is-active" if profiles?)
|
||||||
) %>
|
) %>
|
||||||
|
|||||||
@@ -68,6 +68,14 @@ class Admin::MenuComponent < ApplicationComponent
|
|||||||
%w[newsletters emails_download admin_notifications system_emails]
|
%w[newsletters emails_download admin_notifications system_emails]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def sdg_managers?
|
||||||
|
controller_name == "managers" && controller.class.parent == Admin::SDG
|
||||||
|
end
|
||||||
|
|
||||||
|
def managers?
|
||||||
|
controller_name == "managers" && controller.class.parent == Admin
|
||||||
|
end
|
||||||
|
|
||||||
def officers_link
|
def officers_link
|
||||||
[
|
[
|
||||||
t("admin.menu.poll_officers"),
|
t("admin.menu.poll_officers"),
|
||||||
@@ -272,7 +280,7 @@ class Admin::MenuComponent < ApplicationComponent
|
|||||||
[
|
[
|
||||||
t("admin.menu.managers"),
|
t("admin.menu.managers"),
|
||||||
admin_managers_path,
|
admin_managers_path,
|
||||||
controller_name == "managers"
|
managers?
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -347,4 +355,12 @@ class Admin::MenuComponent < ApplicationComponent
|
|||||||
controller_name == "actions"
|
controller_name == "actions"
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def sdg_managers_link
|
||||||
|
[
|
||||||
|
t("admin.menu.sdg_managers"),
|
||||||
|
admin_sdg_managers_path,
|
||||||
|
sdg_managers?
|
||||||
|
]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user