|
|
@ -5,14 +5,19 @@
|
|
|
|
{{template "repo/sub_menu" .}}
|
|
|
|
{{template "repo/sub_menu" .}}
|
|
|
|
<div class="repo-button-row">
|
|
|
|
<div class="repo-button-row">
|
|
|
|
<div class="repo-button-row-left">
|
|
|
|
<div class="repo-button-row-left">
|
|
|
|
|
|
|
|
{{- /* for /owner/repo/commits/branch/the-name */ -}}
|
|
|
|
{{$branchDropdownCurrentRefType := "branch"}}
|
|
|
|
{{- $branchDropdownCurrentRefType := "branch" -}}
|
|
|
|
{{$branchDropdownCurrentRefShortName := .BranchName}}
|
|
|
|
{{- $branchDropdownCurrentRefShortName := .BranchName -}}
|
|
|
|
{{if .IsViewTag}}
|
|
|
|
{{- if .IsViewTag -}}
|
|
|
|
{{$branchDropdownCurrentRefType = "tag"}}
|
|
|
|
{{- /* for /owner/repo/commits/tag/the-name */ -}}
|
|
|
|
{{$branchDropdownCurrentRefShortName = .TagName}}
|
|
|
|
{{- $branchDropdownCurrentRefType = "tag" -}}
|
|
|
|
{{end}}
|
|
|
|
{{- $branchDropdownCurrentRefShortName = .TagName -}}
|
|
|
|
{{template "repo/branch_dropdown" dict
|
|
|
|
{{- else if .IsViewCommit -}}
|
|
|
|
|
|
|
|
{{- /* for /owner/repo/commits/commit/000000 */ -}}
|
|
|
|
|
|
|
|
{{- $branchDropdownCurrentRefType = "commit" -}}
|
|
|
|
|
|
|
|
{{- $branchDropdownCurrentRefShortName = ShortSha .CommitID -}}
|
|
|
|
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{- template "repo/branch_dropdown" dict
|
|
|
|
"Repository" .Repository
|
|
|
|
"Repository" .Repository
|
|
|
|
"ShowTabBranches" true
|
|
|
|
"ShowTabBranches" true
|
|
|
|
"ShowTabTags" true
|
|
|
|
"ShowTabTags" true
|
|
|
@ -21,8 +26,7 @@
|
|
|
|
"CurrentTreePath" .TreePath
|
|
|
|
"CurrentTreePath" .TreePath
|
|
|
|
"RefLinkTemplate" "{RepoLink}/commits/{RefType}/{RefShortName}/{TreePath}"
|
|
|
|
"RefLinkTemplate" "{RepoLink}/commits/{RefType}/{RefShortName}/{TreePath}"
|
|
|
|
"AllowCreateNewRef" .CanCreateBranch
|
|
|
|
"AllowCreateNewRef" .CanCreateBranch
|
|
|
|
}}
|
|
|
|
-}}
|
|
|
|
|
|
|
|
|
|
|
|
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
|
|
|
|
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
|
|
|
|
{{svg "octicon-git-branch"}}
|
|
|
|
{{svg "octicon-git-branch"}}
|
|
|
|
{{ctx.Locale.Tr "repo.commit_graph"}}
|
|
|
|
{{ctx.Locale.Tr "repo.commit_graph"}}
|
|
|
|