1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-26 04:08:35 +00:00

Fix git graph page (#34948) (#34949)

This commit is contained in:
wxiaoguang
2025-07-04 23:33:17 +08:00
committed by GitHub
parent 9adf175df0
commit 4aba42519d
4 changed files with 19 additions and 7 deletions

View File

@@ -169,10 +169,13 @@ func Graph(ctx *context.Context) {
ctx.Data["Username"] = ctx.Repo.Owner.Name
ctx.Data["Reponame"] = ctx.Repo.Repository.Name
divOnly := ctx.FormBool("div-only")
queryParams := ctx.Req.URL.Query()
queryParams.Del("div-only")
paginator := context.NewPagination(int(graphCommitsCount), setting.UI.GraphMaxCommitNum, page, 5)
paginator.AddParamFromRequest(ctx.Req)
paginator.AddParamFromQuery(queryParams)
ctx.Data["Page"] = paginator
if ctx.FormBool("div-only") {
if divOnly {
ctx.HTML(http.StatusOK, tplGraphDiv)
return
}