diff options
author | Unknwon <u@gogs.io> | 2016-07-24 00:23:54 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-07-24 00:23:54 +0800 |
commit | 46e96c008cf966428c9dad71c7871de88186e3fe (patch) | |
tree | 57e276d8f971c74a6dac841352ec2bee96e93d8f /routers/admin | |
parent | 256cd6374adf646a46265efe18a2d3f822bf7269 (diff) | |
download | gitea-46e96c008cf966428c9dad71c7871de88186e3fe.tar.gz gitea-46e96c008cf966428c9dad71c7871de88186e3fe.zip |
Use struct for UI settings
Diffstat (limited to 'routers/admin')
-rw-r--r-- | routers/admin/notice.go | 4 | ||||
-rw-r--r-- | routers/admin/orgs.go | 2 | ||||
-rw-r--r-- | routers/admin/repos.go | 2 | ||||
-rw-r--r-- | routers/admin/users.go | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/routers/admin/notice.go b/routers/admin/notice.go index 09222eb84e..5d4e807ee4 100644 --- a/routers/admin/notice.go +++ b/routers/admin/notice.go @@ -29,9 +29,9 @@ func Notices(ctx *context.Context) { if page <= 1 { page = 1 } - ctx.Data["Page"] = paginater.New(int(total), setting.AdminNoticePagingNum, page, 5) + ctx.Data["Page"] = paginater.New(int(total), setting.UI.Admin.NoticePagingNum, page, 5) - notices, err := models.Notices(page, setting.AdminNoticePagingNum) + notices, err := models.Notices(page, setting.UI.Admin.NoticePagingNum) if err != nil { ctx.Handle(500, "Notices", err) return diff --git a/routers/admin/orgs.go b/routers/admin/orgs.go index 28e9d79f06..3200072107 100644 --- a/routers/admin/orgs.go +++ b/routers/admin/orgs.go @@ -25,7 +25,7 @@ func Organizations(ctx *context.Context) { Type: models.USER_TYPE_ORGANIZATION, Counter: models.CountOrganizations, Ranger: models.Organizations, - PageSize: setting.AdminOrgPagingNum, + PageSize: setting.UI.Admin.OrgPagingNum, OrderBy: "id ASC", TplName: ORGS, }) diff --git a/routers/admin/repos.go b/routers/admin/repos.go index 8b5caa8d72..dc259c634f 100644 --- a/routers/admin/repos.go +++ b/routers/admin/repos.go @@ -26,7 +26,7 @@ func Repos(ctx *context.Context) { Counter: models.CountRepositories, Ranger: models.Repositories, Private: true, - PageSize: setting.AdminRepoPagingNum, + PageSize: setting.UI.Admin.RepoPagingNum, OrderBy: "id ASC", TplName: REPOS, }) diff --git a/routers/admin/users.go b/routers/admin/users.go index 9b017fa532..b7056957e9 100644 --- a/routers/admin/users.go +++ b/routers/admin/users.go @@ -33,7 +33,7 @@ func Users(ctx *context.Context) { Type: models.USER_TYPE_INDIVIDUAL, Counter: models.CountUsers, Ranger: models.Users, - PageSize: setting.AdminUserPagingNum, + PageSize: setting.UI.Admin.UserPagingNum, OrderBy: "id ASC", TplName: USERS, }) |