diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-08-30 20:49:51 +0800 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-08-30 20:49:51 +0800 |
commit | 9bc63bda7ded31b77ad4aaf3495582a7c8555d2f (patch) | |
tree | 7c900df2d0ec5e15cebeddee8ba6fb3e418d2297 /routers/admin | |
parent | 66d51804c92d39b494563693fe912f11b59810bd (diff) | |
download | gitea-9bc63bda7ded31b77ad4aaf3495582a7c8555d2f.tar.gz gitea-9bc63bda7ded31b77ad4aaf3495582a7c8555d2f.zip |
Finish all new admin pages.
Diffstat (limited to 'routers/admin')
-rw-r--r-- | routers/admin/admin.go | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go index b2c932c98f..756d76c0f7 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -22,10 +22,9 @@ import ( ) const ( - DASHBOARD base.TplName = "admin/dashboard" - CONFIG base.TplName = "admin/config" - MONITOR_PROCESS base.TplName = "admin/monitor/process" - MONITOR_CRON base.TplName = "admin/monitor/cron" + DASHBOARD base.TplName = "admin/dashboard" + CONFIG base.TplName = "admin/config" + MONITOR base.TplName = "admin/monitor" ) var ( @@ -155,8 +154,9 @@ func Dashboard(ctx *middleware.Context) { } func Config(ctx *middleware.Context) { - ctx.Data["Title"] = "Server Configuration" - ctx.Data["PageIsConfig"] = true + ctx.Data["Title"] = ctx.Tr("admin.users") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminConfig"] = true ctx.Data["AppUrl"] = setting.AppUrl ctx.Data["Domain"] = setting.Domain @@ -212,18 +212,10 @@ func Config(ctx *middleware.Context) { } func Monitor(ctx *middleware.Context) { - ctx.Data["Title"] = "Monitoring Center" - ctx.Data["PageIsMonitor"] = true - - tab := ctx.Query("tab") - switch tab { - case "process": - ctx.Data["PageIsMonitorProcess"] = true - ctx.Data["Processes"] = process.Processes - ctx.HTML(200, MONITOR_PROCESS) - default: - ctx.Data["PageIsMonitorCron"] = true - ctx.Data["Entries"] = cron.ListEntries() - ctx.HTML(200, MONITOR_CRON) - } + ctx.Data["Title"] = ctx.Tr("admin.monitor") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminMonitor"] = true + ctx.Data["Processes"] = process.Processes + ctx.Data["Entries"] = cron.ListEntries() + ctx.HTML(200, MONITOR) } |