summaryrefslogtreecommitdiffstats
path: root/routers/admin/admin.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-08-29 20:50:43 +0800
committerUnknwon <joe2010xtmf@163.com>2014-08-29 20:50:43 +0800
commitd2aff9a46a20bfd5345fec8a88d2638997a833c0 (patch)
treef655789858cc809b080bcd49ee75824384e550a5 /routers/admin/admin.go
parent904bf1a50b021798344f8e124439bdd6a4db9cfc (diff)
downloadgitea-d2aff9a46a20bfd5345fec8a88d2638997a833c0.tar.gz
gitea-d2aff9a46a20bfd5345fec8a88d2638997a833c0.zip
Continue working on new admin pages
Diffstat (limited to 'routers/admin/admin.go')
-rw-r--r--routers/admin/admin.go44
1 files changed, 0 insertions, 44 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index 75dbf2712b..b2c932c98f 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -23,8 +23,6 @@ import (
const (
DASHBOARD base.TplName = "admin/dashboard"
- REPOS base.TplName = "admin/repos"
- AUTHS base.TplName = "admin/auths"
CONFIG base.TplName = "admin/config"
MONITOR_PROCESS base.TplName = "admin/monitor/process"
MONITOR_CRON base.TplName = "admin/monitor/cron"
@@ -156,48 +154,6 @@ func Dashboard(ctx *middleware.Context) {
ctx.HTML(200, DASHBOARD)
}
-func Repositories(ctx *middleware.Context) {
- ctx.Data["Title"] = "Repository Management"
- ctx.Data["PageIsRepos"] = true
-
- p := com.StrTo(ctx.Query("p")).MustInt()
- if p < 1 {
- p = 1
- }
- pageNum := 50
- count := models.CountRepositories()
- curCount := int64((p-1)*pageNum + pageNum)
- if curCount > count {
- p = int(count) / pageNum
- } else if count > curCount {
- ctx.Data["NextPageNum"] = p + 1
- }
- if p > 1 {
- ctx.Data["LastPageNum"] = p - 1
- }
-
- var err error
- ctx.Data["Repos"], err = models.GetRepositoriesWithUsers(pageNum, (p-1)*pageNum)
- if err != nil {
- ctx.Handle(500, "admin.Repositories", err)
- return
- }
- ctx.HTML(200, REPOS)
-}
-
-func Auths(ctx *middleware.Context) {
- ctx.Data["Title"] = "Auth Sources"
- ctx.Data["PageIsAuths"] = true
-
- var err error
- ctx.Data["Sources"], err = models.GetAuths()
- if err != nil {
- ctx.Handle(500, "admin.Auths", err)
- return
- }
- ctx.HTML(200, AUTHS)
-}
-
func Config(ctx *middleware.Context) {
ctx.Data["Title"] = "Server Configuration"
ctx.Data["PageIsConfig"] = true