diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-25 23:15:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-25 23:15:58 +0800 |
commit | 6c2196146212c47304af12f5533cd46e5ff02807 (patch) | |
tree | fabb1016ddc5fb8598a7868e9825cf19b0301423 /routers | |
parent | e8f1f091328cac7fa2e56de24083e8e9d139e1bd (diff) | |
download | gitea-6c2196146212c47304af12f5533cd46e5ff02807.tar.gz gitea-6c2196146212c47304af12f5533cd46e5ff02807.zip |
org settings -> webhook/labels/deletion should also active the menu (#17809)
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/org/org_labels.go | 1 | ||||
-rw-r--r-- | routers/web/org/setting.go | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/routers/web/org/org_labels.go b/routers/web/org/org_labels.go index 5079d9baa7..7a8aa184b2 100644 --- a/routers/web/org/org_labels.go +++ b/routers/web/org/org_labels.go @@ -34,6 +34,7 @@ func NewLabel(ctx *context.Context) { form := web.GetForm(ctx).(*forms.CreateLabelForm) ctx.Data["Title"] = ctx.Tr("repo.labels") ctx.Data["PageIsLabels"] = true + ctx.Data["PageIsOrgSettings"] = true if ctx.HasError() { ctx.Flash.Error(ctx.Data["ErrorMsg"].(string)) diff --git a/routers/web/org/setting.go b/routers/web/org/setting.go index f0e1db14d0..de4fa05e4a 100644 --- a/routers/web/org/setting.go +++ b/routers/web/org/setting.go @@ -39,6 +39,7 @@ const ( // Settings render the main settings page func Settings(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("org.settings") + ctx.Data["PageIsOrgSettings"] = true ctx.Data["PageIsSettingsOptions"] = true ctx.Data["CurrentVisibility"] = ctx.Org.Organization.Visibility ctx.Data["RepoAdminChangeTeamAccess"] = ctx.Org.Organization.RepoAdminChangeTeamAccess @@ -49,6 +50,7 @@ func Settings(ctx *context.Context) { func SettingsPost(ctx *context.Context) { form := web.GetForm(ctx).(*forms.UpdateOrgSettingForm) ctx.Data["Title"] = ctx.Tr("org.settings") + ctx.Data["PageIsOrgSettings"] = true ctx.Data["PageIsSettingsOptions"] = true ctx.Data["CurrentVisibility"] = ctx.Org.Organization.Visibility @@ -159,6 +161,7 @@ func SettingsDeleteAvatar(ctx *context.Context) { // SettingsDelete response for deleting an organization func SettingsDelete(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("org.settings") + ctx.Data["PageIsOrgSettings"] = true ctx.Data["PageIsSettingsDelete"] = true if ctx.Req.Method == "POST" { @@ -188,6 +191,7 @@ func SettingsDelete(ctx *context.Context) { // Webhooks render webhook list page func Webhooks(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("org.settings") + ctx.Data["PageIsOrgSettings"] = true ctx.Data["PageIsSettingsHooks"] = true ctx.Data["BaseLink"] = ctx.Org.OrgLink + "/settings/hooks" ctx.Data["BaseLinkNew"] = ctx.Org.OrgLink + "/settings/hooks" @@ -219,6 +223,7 @@ func DeleteWebhook(ctx *context.Context) { // Labels render organization labels page func Labels(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("repo.labels") + ctx.Data["PageIsOrgSettings"] = true ctx.Data["PageIsOrgSettingsLabels"] = true ctx.Data["RequireTribute"] = true ctx.Data["LabelTemplates"] = models.LabelTemplates |