You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/templates/repo/view_file_tree_sidebar.tmpl

31 lines
1.2 KiB
Handlebars

{{- /* for repo home (default branch) and /owner/repo/src/branch/the-name */ -}}
{{- $branchDropdownCurrentRefType := "branch" -}}
{{- $branchDropdownCurrentRefShortName := .BranchName -}}
{{- if .IsViewTag -}}
{{- /* for /owner/repo/src/tag/the-name */ -}}
{{- $branchDropdownCurrentRefType = "tag" -}}
{{- $branchDropdownCurrentRefShortName = .TagName -}}
{{- else if .IsViewCommit -}}
{{- /* for /owner/repo/src/commit/000000 */ -}}
{{- $branchDropdownCurrentRefType = "commit" -}}
{{- $branchDropdownCurrentRefShortName = ShortSha .CommitID -}}
{{- end -}}
2 months ago
<div class="view-file-tree-sidebar-top">
<div class="sidebar-header">
<button class="hide-tree-sidebar-button ui compact basic button icon" title="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}">
{{svg "octicon-sidebar-expand" 20 "icon"}}
</button>
<b> Files</b>
</div>
2 months ago
<!--// TODO: Dynamically move components such as refSelector and createPR here-->
</div>
<div class="view-file-tree-sidebar-bottom">
2 months ago
<div id="view-file-tree" class="is-loading"
data-api-base-url="{{.RepoLink}}"
data-tree-path="{{$.TreePath}}"
data-current-ref-type="{{$branchDropdownCurrentRefType}}"
data-current-ref-short-name="{{$branchDropdownCurrentRefShortName}}"
></div>
</div>