From 24c3bb95acfd906dc752f867615dafd170176502 Mon Sep 17 00:00:00 2001 From: HesterG Date: Mon, 24 Jul 2023 09:05:16 +0800 Subject: [PATCH] Categorize admin settings sidebar panel (#26030) This PR reorganize and categorize the admin settings sidebar panel into groups: - User Accounts, User Emails, Organizations, Authentication Sources -> Identity & Access - Repositories, Packages -> Code Assets - Webhooks, Applications -> Integrations Before: Screen Shot 2023-07-21 at 10 30 28 After: all configurable settings enabled (package, oauth, webhook) Screen Shot 2023-07-21 at 10 27 30 all configurable settings disabled (package, oauth, webhook) Screen Shot 2023-07-21 at 10 25 19 only oauth enabled Screen Shot 2023-07-21 at 10 26 23 only webhook enabled Screen Shot 2023-07-21 at 10 26 55 --- options/locale/locale_en-US.ini | 3 ++ templates/admin/navbar.tmpl | 77 ++++++++++++++++++++++----------- 2 files changed, 54 insertions(+), 26 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 94ae490981..24be7e0fc3 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -2627,10 +2627,13 @@ teams.invite.description = Please click the button below to join the team. [admin] dashboard = Dashboard +identity_access = Identity & Access users = User Accounts organizations = Organizations +assets = Code Assets repositories = Repositories hooks = Webhooks +integrations = Integrations authentication = Authentication Sources emails = User Emails config = Configuration diff --git a/templates/admin/navbar.tmpl b/templates/admin/navbar.tmpl index a96e5c9367..4cfdbac73f 100644 --- a/templates/admin/navbar.tmpl +++ b/templates/admin/navbar.tmpl @@ -4,35 +4,60 @@ {{.locale.Tr "admin.dashboard"}} - - {{.locale.Tr "admin.users"}} - - - {{.locale.Tr "admin.organizations"}} - - - {{.locale.Tr "admin.repositories"}} - - {{if .EnablePackages}} - - {{.locale.Tr "packages.title"}} - - {{end}} - {{if not DisableWebhooks}} +
+ {{.locale.Tr "admin.identity_access"}} + +
+
+ {{.locale.Tr "admin.assets"}} + +
+ + {{if and (not DisableWebhooks) .EnableOAuth2}} +
+ {{.locale.Tr "admin.integrations"}} + +
+ {{else}} + {{if not DisableWebhooks}} {{.locale.Tr "admin.hooks"}} - {{end}} - - {{.locale.Tr "admin.authentication"}} - - - {{.locale.Tr "admin.emails"}} - - {{if .EnableOAuth2}} - - {{.locale.Tr "settings.applications"}} - + {{end}} + {{if .EnableOAuth2}} + + {{.locale.Tr "settings.applications"}} + + {{end}} {{end}} {{if .EnableActions}}