Use struct for UI settings
This commit is contained in:
parent
256cd6374a
commit
46e96c008c
16 changed files with 48 additions and 48 deletions
|
@ -163,7 +163,7 @@ func Issues(ctx *context.Context) {
|
|||
} else {
|
||||
total = int(issueStats.ClosedCount)
|
||||
}
|
||||
pager := paginater.New(total, setting.IssuePagingNum, page, 5)
|
||||
pager := paginater.New(total, setting.UI.IssuePagingNum, page, 5)
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
// Get issues.
|
||||
|
@ -1017,7 +1017,7 @@ func Milestones(ctx *context.Context) {
|
|||
} else {
|
||||
total = int(closedCount)
|
||||
}
|
||||
ctx.Data["Page"] = paginater.New(total, setting.IssuePagingNum, page, 5)
|
||||
ctx.Data["Page"] = paginater.New(total, setting.UI.IssuePagingNum, page, 5)
|
||||
|
||||
miles, err := models.GetMilestones(ctx.Repo.Repository.ID, page, isShowClosed)
|
||||
if err != nil {
|
||||
|
|
|
@ -105,7 +105,7 @@ func Home(ctx *context.Context) {
|
|||
case isImageFile:
|
||||
ctx.Data["IsImageFile"] = true
|
||||
case isTextFile:
|
||||
if blob.Size() >= setting.MaxDisplayFileSize {
|
||||
if blob.Size() >= setting.UI.MaxDisplayFileSize {
|
||||
ctx.Data["IsFileTooLarge"] = true
|
||||
} else {
|
||||
ctx.Data["IsFileTooLarge"] = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue