|
73 | 73 | </a>
|
74 | 74 | {{end}}
|
75 | 75 | <a href="{{.Repository.Link}}/find/{{.BranchNameSubURL}}" class="ui compact basic button tooltip" data-content="{{.i18n.Tr "repo.find_file.go_to_file"}}">{{svg "octicon-file-moved" 15}}</a>
|
76 |
| - {{if or .CanAddFile .CanUploadFile}} |
77 |
| - <button class="ui basic small compact dropdown jump icon button mr-2"> |
78 |
| - <span class="text">{{.i18n.Tr "repo.editor.add_file"}}</span> |
79 |
| - <div class="menu"> |
80 |
| - {{if .Repository.CanEnableEditor}} |
81 |
| - {{if .CanAddFile}} |
82 |
| - <a class="item" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}"> |
83 |
| - {{.i18n.Tr "repo.editor.new_file"}} |
84 |
| - </a> |
85 |
| - {{end}} |
86 |
| - {{if .CanUploadFile}} |
87 |
| - <a class="item" href="{{.RepoLink}}/_upload/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}"> |
88 |
| - {{.i18n.Tr "repo.editor.upload_file"}} |
89 |
| - </a> |
90 |
| - {{end}} |
91 |
| - {{if .CanAddFile}} |
92 |
| - <a class="item" href="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}"> |
93 |
| - {{.i18n.Tr "repo.editor.patch"}} |
94 |
| - </a> |
95 |
| - {{end}} |
| 76 | + {{end}} |
| 77 | + {{if or .CanAddFile .CanUploadFile}} |
| 78 | + <button class="ui basic small compact dropdown jump icon button mr-2"> |
| 79 | + <span class="text">{{.i18n.Tr "repo.editor.add_file"}}</span> |
| 80 | + <div class="menu"> |
| 81 | + {{if .Repository.CanEnableEditor}} |
| 82 | + {{if .CanAddFile}} |
| 83 | + <a class="item" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}"> |
| 84 | + {{.i18n.Tr "repo.editor.new_file"}} |
| 85 | + </a> |
96 | 86 | {{end}}
|
97 |
| - </div> |
98 |
| - {{svg "octicon-triangle-down" 14 "dropdown icon"}} |
99 |
| - </button> |
100 |
| - {{end}} |
101 |
| - {{else}} |
102 |
| - <span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section" title="{{$v}}">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{$.BranchLink}}/{{PathEscapeSegments $p}}" title="{{$v}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span> |
| 87 | + {{if .CanUploadFile}} |
| 88 | + <a class="item" href="{{.RepoLink}}/_upload/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}"> |
| 89 | + {{.i18n.Tr "repo.editor.upload_file"}} |
| 90 | + </a> |
| 91 | + {{end}} |
| 92 | + {{if .CanAddFile}} |
| 93 | + <a class="item" href="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}"> |
| 94 | + {{.i18n.Tr "repo.editor.patch"}} |
| 95 | + </a> |
| 96 | + {{end}} |
| 97 | + {{end}} |
| 98 | + </div> |
| 99 | + {{svg "octicon-triangle-down" 14 "dropdown icon"}} |
| 100 | + </button> |
| 101 | + {{end}} |
| 102 | + {{if ne $n 0}} |
| 103 | + <span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section" title="{{$v}}">{{EllipsisString $v 30}}</span>{{else}}{{$p := index $.Paths $i}}<span class="section"><a href="{{$.BranchLink}}/{{PathEscapeSegments $p}}" title="{{$v}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span> |
103 | 104 | {{end}}
|
104 | 105 | </div>
|
105 | 106 | <div class="df ac">
|
|
0 commit comments