mirror of
https://github.com/go-gitea/gitea
synced 2025-08-03 16:18:36 +00:00
Refactor RepoBranchTagSelector (#32681)
This commit is contained in:
@@ -5,7 +5,24 @@
|
||||
{{template "repo/sub_menu" .}}
|
||||
<div class="repo-button-row">
|
||||
<div class="repo-button-row-left">
|
||||
{{template "repo/branch_dropdown" dict "root" .}}
|
||||
|
||||
{{$branchDropdownCurrentRefType := "branch"}}
|
||||
{{$branchDropdownCurrentRefShortName := .BranchName}}
|
||||
{{if .IsViewTag}}
|
||||
{{$branchDropdownCurrentRefType := "tag"}}
|
||||
{{$branchDropdownCurrentRefShortName := .TagName}}
|
||||
{{end}}
|
||||
{{template "repo/branch_dropdown" dict
|
||||
"Repository" .Repository
|
||||
"ShowTabBranches" true
|
||||
"ShowTabTags" true
|
||||
"CurrentRefType" $branchDropdownCurrentRefType
|
||||
"CurrentRefShortName" $branchDropdownCurrentRefShortName
|
||||
"CurrentTreePath" .TreePath
|
||||
"RefLinkTemplate" "{RepoLink}/commits/{RefType}/{RefShortName}/{TreePath}"
|
||||
"AllowCreateNewRef" .CanCreateBranch
|
||||
}}
|
||||
|
||||
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
|
||||
{{svg "octicon-git-branch"}}
|
||||
{{ctx.Locale.Tr "repo.commit_graph"}}
|
||||
|
Reference in New Issue
Block a user