diff options
author | Giteabot <teabot@gitea.io> | 2023-03-14 08:51:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 20:51:14 +0800 |
commit | 8536dc4b73a22be203659c0b64bba7537efa63d7 (patch) | |
tree | 774c2321bc54a2e9d593ab66a7a10cb9f1f375e1 /templates | |
parent | 0a0f46f2990ada3abf4661f89ffe4ed539690e29 (diff) | |
download | gitea-8536dc4b73a22be203659c0b64bba7537efa63d7.tar.gz gitea-8536dc4b73a22be203659c0b64bba7537efa63d7.zip |
Make branches list page operations remember current page (#23420) (#23460)
Backport #23420 by @wxiaoguang
Close #23411
Always pass "page" query parameter to backend, and make backend respect
it.
The `ctx.FormInt("limit")` is never used, so removed.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/branch/list.tmpl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index a093c19deb..548d328550 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -81,9 +81,9 @@ <td class="three wide right aligned"> {{if not .LatestPullRequest}} {{if .IsIncluded}} - <a class="ui tooltip orange large label" data-content="{{$.locale.Tr "repo.branch.included_desc"}}" data-position="top right"> + <span class="ui tooltip orange large label" data-content="{{$.locale.Tr "repo.branch.included_desc"}}" data-position="top right"> {{svg "octicon-git-pull-request"}} {{$.locale.Tr "repo.branch.included"}} - </a> + </span> {{else if and (not .IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}} <a href="{{$.RepoLink}}/compare/{{PathEscapeSegments $.DefaultBranch}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{PathEscape $.Owner.Name}}:{{end}}{{PathEscapeSegments .Name}}"> <button id="new-pull-request" class="ui compact basic button gt-mr-0">{{if $.CanPull}}{{$.locale.Tr "repo.pulls.compare_changes"}}{{else}}{{$.locale.Tr "action.compare_branch"}}{{end}}</button> @@ -123,13 +123,13 @@ {{end}} {{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}} {{if .IsDeleted}} - <button class="ui basic jump button icon tooltip undo-button" data-url="{{$.Link}}/restore?branch_id={{.DeletedBranch.ID}}&name={{.DeletedBranch.Name}}" data-content="{{$.locale.Tr "repo.branch.restore" (.Name)}}" data-position="top right"> + <button class="ui basic jump button icon tooltip undo-button" data-url="{{$.Link}}/restore?branch_id={{.DeletedBranch.ID}}&name={{.DeletedBranch.Name}}&page={{$.Page.Paginater.Current}}" data-content="{{$.locale.Tr "repo.branch.restore" (.Name)}}" data-position="top right"> <span class="text blue"> {{svg "octicon-reply"}} </span> </button> {{else}} - <button class="ui basic jump button icon tooltip delete-button delete-branch-button" data-url="{{$.Link}}/delete?name={{.Name}}" data-content="{{$.locale.Tr "repo.branch.delete" (.Name)}}" data-position="top right" data-name="{{.Name}}"> + <button class="ui basic jump button icon tooltip delete-button delete-branch-button" data-url="{{$.Link}}/delete?name={{.Name}}&page={{$.Page.Paginater.Current}}" data-content="{{$.locale.Tr "repo.branch.delete" (.Name)}}" data-position="top right" data-name="{{.Name}}"> {{svg "octicon-trash"}} </button> {{end}} |