|
|
|
@ -101,7 +101,7 @@ func Commits(ctx *context.Context) { |
|
|
|
|
ctx.Data["CommitCount"] = commitsCount |
|
|
|
|
|
|
|
|
|
pager := context.NewPagination(int(commitsCount), pageSize, page, 5) |
|
|
|
|
pager.SetDefaultParams(ctx) |
|
|
|
|
pager.AddParamFromRequest(ctx.Req) |
|
|
|
|
ctx.Data["Page"] = pager |
|
|
|
|
ctx.HTML(http.StatusOK, tplCommits) |
|
|
|
|
} |
|
|
|
@ -139,7 +139,6 @@ func Graph(ctx *context.Context) { |
|
|
|
|
if err != nil { |
|
|
|
|
log.Warn("GetCommitGraphsCount error for generate graph exclude prs: %t branches: %s in %-v, Will Ignore branches and try again. Underlying Error: %v", hidePRRefs, branches, ctx.Repo.Repository, err) |
|
|
|
|
realBranches = []string{} |
|
|
|
|
branches = []string{} |
|
|
|
|
graphCommitsCount, err = ctx.Repo.GetCommitGraphsCount(ctx, hidePRRefs, realBranches, files) |
|
|
|
|
if err != nil { |
|
|
|
|
ctx.ServerError("GetCommitGraphsCount", err) |
|
|
|
@ -175,14 +174,7 @@ func Graph(ctx *context.Context) { |
|
|
|
|
ctx.Data["CommitCount"] = commitsCount |
|
|
|
|
|
|
|
|
|
paginator := context.NewPagination(int(graphCommitsCount), setting.UI.GraphMaxCommitNum, page, 5) |
|
|
|
|
paginator.AddParamString("mode", mode) |
|
|
|
|
paginator.AddParamString("hide-pr-refs", fmt.Sprint(hidePRRefs)) |
|
|
|
|
for _, branch := range branches { |
|
|
|
|
paginator.AddParamString("branch", branch) |
|
|
|
|
} |
|
|
|
|
for _, file := range files { |
|
|
|
|
paginator.AddParamString("file", file) |
|
|
|
|
} |
|
|
|
|
paginator.AddParamFromRequest(ctx.Req) |
|
|
|
|
ctx.Data["Page"] = paginator |
|
|
|
|
if ctx.FormBool("div-only") { |
|
|
|
|
ctx.HTML(http.StatusOK, tplGraphDiv) |
|
|
|
@ -262,7 +254,7 @@ func FileHistory(ctx *context.Context) { |
|
|
|
|
ctx.Data["CommitCount"] = commitsCount |
|
|
|
|
|
|
|
|
|
pager := context.NewPagination(int(commitsCount), setting.Git.CommitsRangeSize, page, 5) |
|
|
|
|
pager.SetDefaultParams(ctx) |
|
|
|
|
pager.AddParamFromRequest(ctx.Req) |
|
|
|
|
ctx.Data["Page"] = pager |
|
|
|
|
ctx.HTML(http.StatusOK, tplCommits) |
|
|
|
|
} |
|
|
|
|