diff --git a/routers/web/web.go b/routers/web/web.go index b60433771..e4fea3824 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 24a0a093a..e523da7e7 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"}}