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:
@@ -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
|
||||
|
@@ -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,
|
||||
})
|
||||
|
@@ -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,
|
||||
})
|
||||
|
@@ -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,
|
||||
})
|
||||
|
Reference in New Issue
Block a user