mirror of
https://github.com/go-gitea/gitea.git
synced 2025-02-20 11:43:57 +08:00
fix
This commit is contained in:
parent
2a8f9c8531
commit
ad9b126ad6
@ -37,24 +37,7 @@
|
||||
{{svg "octicon-sidebar-collapse" 20 "icon"}}
|
||||
</button>
|
||||
{{end}}
|
||||
{{$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}/src/{RefType}/{RefShortName}/{TreePath}"
|
||||
"AllowCreateNewRef" .CanCreateBranch
|
||||
"ShowViewAllRefsEntry" true
|
||||
"ContainerClasses" (Iif $hasAndShowTreeSidebar "tw-hidden" "")
|
||||
}}
|
||||
{{template "repo/home_branch_dropdown" (dict "ctxData" . "containerClasses" (Iif $hasAndShowTreeSidebar "tw-hidden" ""))}}
|
||||
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
|
||||
{{$cmpBranch := ""}}
|
||||
{{if ne .Repository.ID .BaseRepo.ID}}
|
||||
|
18
templates/repo/home_branch_dropdown.tmpl
Normal file
18
templates/repo/home_branch_dropdown.tmpl
Normal file
@ -0,0 +1,18 @@
|
||||
{{$branchDropdownCurrentRefType := "branch"}}
|
||||
{{$branchDropdownCurrentRefShortName := .ctxData.BranchName}}
|
||||
{{if .ctxData.IsViewTag}}
|
||||
{{$branchDropdownCurrentRefType = "tag"}}
|
||||
{{$branchDropdownCurrentRefShortName = .ctxData.TagName}}
|
||||
{{end}}
|
||||
{{template "repo/branch_dropdown" dict
|
||||
"Repository" .ctxData.Repository
|
||||
"ShowTabBranches" true
|
||||
"ShowTabTags" true
|
||||
"CurrentRefType" $branchDropdownCurrentRefType
|
||||
"CurrentRefShortName" $branchDropdownCurrentRefShortName
|
||||
"CurrentTreePath" .ctxData.TreePath
|
||||
"RefLinkTemplate" "{RepoLink}/src/{RefType}/{RefShortName}/{TreePath}"
|
||||
"AllowCreateNewRef" .ctxData.CanCreateBranch
|
||||
"ShowViewAllRefsEntry" true
|
||||
"ContainerClasses" .containerClasses
|
||||
}}
|
@ -13,17 +13,7 @@
|
||||
<b> Files</b>
|
||||
</div>
|
||||
<div class="sidebar-ref">
|
||||
{{template "repo/branch_dropdown" dict
|
||||
"Repository" .Repository
|
||||
"ShowTabBranches" true
|
||||
"ShowTabTags" true
|
||||
"CurrentRefType" $branchDropdownCurrentRefType
|
||||
"CurrentRefShortName" $branchDropdownCurrentRefShortName
|
||||
"CurrentTreePath" .TreePath
|
||||
"RefLinkTemplate" "{RepoLink}/src/{RefType}/{RefShortName}/{TreePath}"
|
||||
"AllowCreateNewRef" .CanCreateBranch
|
||||
"ShowViewAllRefsEntry" true
|
||||
}}
|
||||
{{template "repo/home_branch_dropdown" (dict "ctxData" .)}}
|
||||
|
||||
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
|
||||
{{$cmpBranch := ""}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user