|
159 | 159 | {{if and $isReviewFile $file.HasChangedSinceLastReview}}
|
160 | 160 | <span class="changed-since-last-review unselectable not-mobile">{{ctx.Locale.Tr "repo.pulls.has_changed_since_last_review"}}</span>
|
161 | 161 | {{end}}
|
162 |
| - {{if not (or $file.IsIncomplete $file.IsBin $file.IsSubmodule)}} |
163 |
| - <button class="ui basic tiny button unescape-button not-mobile">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button> |
164 |
| - <button class="ui basic tiny button escape-button tw-hidden">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button> |
165 |
| - {{end}} |
166 |
| - {{if and (not $file.IsSubmodule) (not $.PageIsWiki)}} |
167 |
| - {{if $file.IsDeleted}} |
168 |
| - <a class="ui basic tiny button" rel="nofollow" href="{{$.BeforeSourcePath}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a> |
169 |
| - {{else}} |
170 |
| - <a class="ui basic tiny button" rel="nofollow" href="{{$.SourcePath}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a> |
171 |
| - {{if and $.Repository.CanEnableEditor $.CanEditFile (not $file.IsLFSFile) (not $file.IsBin)}} |
172 |
| - <a class="ui basic tiny button" rel="nofollow" href="{{$.HeadRepoLink}}/_edit/{{PathEscapeSegments $.HeadBranchName}}/{{PathEscapeSegments $file.Name}}?return_uri={{print $.BackToLink "#diff-" $file.NameHash | QueryEscape}}">{{ctx.Locale.Tr "repo.editor.edit_this_file"}}</a> |
173 |
| - {{end}} |
174 |
| - {{end}} |
175 |
| - {{end}} |
176 | 162 | {{if $isReviewFile}}
|
177 | 163 | <label data-link="{{$.Issue.Link}}/viewed-files" data-headcommit="{{$.AfterCommitID}}" class="viewed-file-form unselectable{{if $file.IsViewed}} viewed-file-checked-form{{end}}">
|
178 | 164 | <input type="checkbox" name="{{$file.GetDiffFileName}}" autocomplete="off"{{if $file.IsViewed}} checked{{end}}> {{ctx.Locale.Tr "repo.pulls.has_viewed_file"}}
|
179 | 165 | </label>
|
180 | 166 | {{end}}
|
| 167 | + <div class="ui dropdown basic"> |
| 168 | + {{svg "octicon-kebab-horizontal" 18 "icon tw-mx-2"}} |
| 169 | + <div class="ui menu"> |
| 170 | + {{if not (or $file.IsIncomplete $file.IsBin $file.IsSubmodule)}} |
| 171 | + <button class="unescape-button item">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button> |
| 172 | + <button class="escape-button tw-hidden item">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button> |
| 173 | + {{end}} |
| 174 | + {{if and (not $file.IsSubmodule) (not $.PageIsWiki)}} |
| 175 | + {{if $file.IsDeleted}} |
| 176 | + <a class="item" rel="nofollow" href="{{$.BeforeSourcePath}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a> |
| 177 | + {{else}} |
| 178 | + <a class="item" rel="nofollow" href="{{$.SourcePath}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a> |
| 179 | + {{if and $.Repository.CanEnableEditor $.CanEditFile (not $file.IsLFSFile) (not $file.IsBin)}} |
| 180 | + <a class="item" rel="nofollow" href="{{$.HeadRepoLink}}/_edit/{{PathEscapeSegments $.HeadBranchName}}/{{PathEscapeSegments $file.Name}}?return_uri={{print $.BackToLink "#diff-" $file.NameHash | QueryEscape}}">{{ctx.Locale.Tr "repo.editor.edit_this_file"}}</a> |
| 181 | + {{end}} |
| 182 | + {{end}} |
| 183 | + {{end}} |
| 184 | + </div> |
| 185 | + </div> |
181 | 186 | </div>
|
182 | 187 | </h4>
|
183 | 188 | <div class="diff-file-body ui attached unstackable table segment" {{if and $file.IsViewed $.IsShowingAllCommits}}data-folded="true"{{end}}>
|
|
0 commit comments