1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Refactor initRepoBranchTagSelector to use new init framework (#33776)

Make "initRepoBranchTagSelector" to use new init framework and fix the
abused "js-branch-tag-selector" styles

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Kerwin Bryant
2025-03-04 04:58:19 +08:00
committed by GitHub
parent ad204f9c5a
commit 14be462646
4 changed files with 9 additions and 6 deletions

View File

@@ -14,7 +14,8 @@
Search "repo/branch_dropdown" in the template directory to find all occurrences.
*/}}
<div class="js-branch-tag-selector {{if .ContainerClasses}}{{.ContainerClasses}}{{end}}"
<div class="{{if .ContainerClasses}}{{.ContainerClasses}}{{end}}"
data-global-init="initRepoBranchTagSelector"
data-text-release-compare="{{ctx.Locale.Tr "repo.release.compare"}}"
data-text-branches="{{ctx.Locale.Tr "repo.branches"}}"
data-text-tags="{{ctx.Locale.Tr "repo.tags"}}"

View File

@@ -21,6 +21,7 @@
{{$compareTarget = $release.Sha1}}
{{end}}
{{template "repo/branch_dropdown" dict
"ContainerClasses" "release-branch-tag-selector"
"Repository" $.Repository
"ShowTabTags" true
"DropdownFixedText" (ctx.Locale.Tr "repo.release.compare")