diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-03-14 13:11:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 13:11:38 +0800 |
commit | 6ff5400af91aefb02cbc7dd59f6be23cc2bf7865 (patch) | |
tree | f16e7e5223ac37bc795a96679309eecc8ce67a12 /templates | |
parent | 0efa9d564941e6539df98ed4ddd906a05c1fa7e7 (diff) | |
download | gitea-6ff5400af91aefb02cbc7dd59f6be23cc2bf7865.tar.gz gitea-6ff5400af91aefb02cbc7dd59f6be23cc2bf7865.zip |
Make branches list page operations remember current page (#23420)
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: 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 7e8bf348a4..898be4d6bb 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}} |