mirror of
https://github.com/go-gitea/gitea
synced 2024-11-18 16:14:26 +00:00
Fix indent in notice router
This commit is contained in:
parent
c98dad1cf3
commit
a8fd615adc
@ -24,14 +24,14 @@ func Notices(ctx *middleware.Context) {
|
|||||||
ctx.Data["PageIsAdmin"] = true
|
ctx.Data["PageIsAdmin"] = true
|
||||||
ctx.Data["PageIsAdminNotices"] = true
|
ctx.Data["PageIsAdminNotices"] = true
|
||||||
|
|
||||||
total := models.CountNotices()
|
total := models.CountNotices()
|
||||||
page := ctx.QueryInt("page")
|
page := ctx.QueryInt("page")
|
||||||
if page <= 1 {
|
if page <= 1 {
|
||||||
page = 1
|
page = 1
|
||||||
}
|
}
|
||||||
ctx.Data["Page"] = paginater.New(int(total), setting.AdminNoticePagingNum, page, 5)
|
ctx.Data["Page"] = paginater.New(int(total), setting.AdminNoticePagingNum, page, 5)
|
||||||
|
|
||||||
notices, err := models.Notices(page, setting.AdminNoticePagingNum)
|
notices, err := models.Notices(page, setting.AdminNoticePagingNum)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Handle(500, "Notices", err)
|
ctx.Handle(500, "Notices", err)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user