mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-24 05:39:46 +02:00
add tree sidebar to file view
This commit is contained in:
1 parent
59e46d46e0
commit
c4e7f0c119
4 files changed
+29
-18
No files matched your search
@@ -1,4 +1,11 @@
|
||||
{{template "base/head" .}}
|
||||
{{$treeNamesLen := len .TreeNames}}
|
||||
{{$isTreePathRoot := eq $treeNamesLen 0}}
|
||||
{{$showSidebar := $isTreePathRoot}}
|
||||
{{$hasTreeSidebar := not $isTreePathRoot}}
|
||||
{{$showTreeSidebar := .RepoPreferences.ShowFileViewTreeSidebar}}
|
||||
{{$hideTreeSidebar := not $showTreeSidebar}}
|
||||
{{$hasAndShowTreeSidebar := and $hasTreeSidebar $showTreeSidebar}}
|
||||
<div role="main" aria-label="{{.Title}}" class="page-content repository file list {{if .IsBlame}}blame{{end}}">
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container {{if .IsBlame}}fluid padded{{end}}">
|
||||
@@ -16,13 +23,6 @@
|
||||
|
||||
{{template "repo/code/recently_pushed_new_branches" .}}
|
||||
|
||||
{{$treeNamesLen := len .TreeNames}}
|
||||
{{$isTreePathRoot := eq $treeNamesLen 0}}
|
||||
{{$showSidebar := $isTreePathRoot}}
|
||||
{{$hasTreeSidebar := not $isTreePathRoot}}
|
||||
{{$showTreeSidebar := .RepoPreferences.ShowFileViewTreeSidebar}}
|
||||
{{$hideTreeSidebar := not $showTreeSidebar}}
|
||||
{{$hasAndShowTreeSidebar := and $hasTreeSidebar $showTreeSidebar}}
|
||||
<div class="{{Iif $showSidebar "repo-grid-filelist-sidebar" (Iif $showTreeSidebar "repo-grid-tree-sidebar" "repo-grid-filelist-only")}}">
|
||||
{{if $hasTreeSidebar}}
|
||||
<div class="repo-view-file-tree-sidebar not-mobile {{if $hideTreeSidebar}}tw-hidden{{end}}">{{template "repo/view_file_tree_sidebar" .}}</div>
|
||||
|
||||
Reference in new issue
Block a user