1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 10:48:37 +00:00

Use struct for UI settings

This commit is contained in:
Unknwon
2016-07-24 00:23:54 +08:00
parent 256cd6374a
commit 46e96c008c
16 changed files with 48 additions and 48 deletions

View File

@@ -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

View File

@@ -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,
})

View File

@@ -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,
})

View File

@@ -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,
})