diff --git a/routers/web/web.go b/routers/web/web.go index b6043377154..e4fea38244a 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -566,6 +566,8 @@ func RegisterRoutes(m *web.Route) { m.Post("/delete", admin.DeleteNotices) m.Post("/empty", admin.EmptyNotices) }) + }, func(ctx *context.Context) { + ctx.Data["EnablePackages"] = setting.Packages.Enabled }, adminReq) // ***** END: Admin ***** diff --git a/templates/admin/navbar.tmpl b/templates/admin/navbar.tmpl index 24a0a093a6b..e523da7e7a9 100644 --- a/templates/admin/navbar.tmpl +++ b/templates/admin/navbar.tmpl @@ -12,9 +12,11 @@ {{.i18n.Tr "admin.repositories"}} - - {{.i18n.Tr "packages.title"}} - + {{if .EnablePackages}} + + {{.i18n.Tr "packages.title"}} + + {{end}} {{if not DisableWebhooks}} {{.i18n.Tr "admin.hooks"}}