File tree Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Original file line number Diff line number Diff line change 7777 <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>
7878 {{end}}
7979 {{if or .CanAddFile .CanUploadFile}}
80- <button class="ui basic small compact dropdown jump icon button mr-2">
80+ <button class="ui basic small compact dropdown jump icon button mr-2"{{if not .Repository.CanEnableEditor}} disabled{{end}} >
8181 <span class="text">{{.locale.Tr "repo.editor.add_file"}}</span>
8282 <div class="menu">
83- {{if .Repository.CanEnableEditor}}
84- {{if .CanAddFile}}
85- <a class="item" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
86- {{.locale.Tr "repo.editor.new_file"}}
87- </a>
88- {{end}}
89- {{if .CanUploadFile}}
90- <a class="item" href="{{.RepoLink}}/_upload/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
91- {{.locale.Tr "repo.editor.upload_file"}}
92- </a>
93- {{end}}
94- {{if .CanAddFile}}
95- <a class="item" href="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
96- {{.locale.Tr "repo.editor.patch"}}
97- </a>
98- {{end}}
83+ {{if .CanAddFile}}
84+ <a class="item" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
85+ {{.locale.Tr "repo.editor.new_file"}}
86+ </a>
87+ {{end}}
88+ {{if .CanUploadFile}}
89+ <a class="item" href="{{.RepoLink}}/_upload/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
90+ {{.locale.Tr "repo.editor.upload_file"}}
91+ </a>
92+ {{end}}
93+ {{if .CanAddFile}}
94+ <a class="item" href="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
95+ {{.locale.Tr "repo.editor.patch"}}
96+ </a>
9997 {{end}}
10098 </div>
10199 {{svg "octicon-triangle-down" 14 "dropdown icon"}}
You can’t perform that action at this time.
0 commit comments