File tree 1 file changed +15
-17
lines changed
1 file changed +15
-17
lines changed Original file line number Diff line number Diff line change 77
77
<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>
78
78
{{end}}
79
79
{{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}} >
81
81
<span class="text">{{.locale.Tr "repo.editor.add_file"}}</span>
82
82
<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>
99
97
{{end}}
100
98
</div>
101
99
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
You can’t perform that action at this time.
0 commit comments