mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 20:07:03 +01:00
Fix sub folder in repository missing add file dropdown (#21069)
In repository sub folder missing add file dropdown menu, Probably broken since #20602
This commit is contained in:
parent
795bd946e2
commit
f1ea6c92d1
1 changed files with 26 additions and 25 deletions
|
@ -73,32 +73,33 @@
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a href="{{.Repository.Link}}/find/{{.BranchNameSubURL}}" class="ui compact basic button tooltip" data-content="{{.locale.Tr "repo.find_file.go_to_file"}}">{{svg "octicon-file-moved" 15}}</a>
|
<a href="{{.Repository.Link}}/find/{{.BranchNameSubURL}}" class="ui compact basic button tooltip" data-content="{{.locale.Tr "repo.find_file.go_to_file"}}">{{svg "octicon-file-moved" 15}}</a>
|
||||||
{{if or .CanAddFile .CanUploadFile}}
|
{{end}}
|
||||||
<button class="ui basic small compact dropdown jump icon button mr-2">
|
{{if or .CanAddFile .CanUploadFile}}
|
||||||
<span class="text">{{.locale.Tr "repo.editor.add_file"}}</span>
|
<button class="ui basic small compact dropdown jump icon button mr-2">
|
||||||
<div class="menu">
|
<span class="text">{{.locale.Tr "repo.editor.add_file"}}</span>
|
||||||
{{if .Repository.CanEnableEditor}}
|
<div class="menu">
|
||||||
{{if .CanAddFile}}
|
{{if .Repository.CanEnableEditor}}
|
||||||
<a class="item" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
|
{{if .CanAddFile}}
|
||||||
{{.locale.Tr "repo.editor.new_file"}}
|
<a class="item" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
|
||||||
</a>
|
{{.locale.Tr "repo.editor.new_file"}}
|
||||||
{{end}}
|
</a>
|
||||||
{{if .CanUploadFile}}
|
|
||||||
<a class="item" href="{{.RepoLink}}/_upload/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
|
|
||||||
{{.locale.Tr "repo.editor.upload_file"}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
{{if .CanAddFile}}
|
|
||||||
<a class="item" href="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
|
|
||||||
{{.locale.Tr "repo.editor.patch"}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
{{if .CanUploadFile}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
<a class="item" href="{{.RepoLink}}/_upload/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
|
||||||
</button>
|
{{.locale.Tr "repo.editor.upload_file"}}
|
||||||
{{end}}
|
</a>
|
||||||
{{else}}
|
{{end}}
|
||||||
|
{{if .CanAddFile}}
|
||||||
|
<a class="item" href="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
|
||||||
|
{{.locale.Tr "repo.editor.patch"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
|
</button>
|
||||||
|
{{end}}
|
||||||
|
{{if ne $n 0}}
|
||||||
<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>
|
<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>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue