aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorKerwin Bryant <kerwin612@qq.com>2024-11-26 09:24:56 +0800
committerGitHub <noreply@github.com>2024-11-26 09:24:56 +0800
commit25cacaf0aa56bece904c84638fbe126a826c1cd8 (patch)
tree0d86f72ee63a68ba1f9d11f6a8cadb41f0b2c3c3 /templates/repo
parent703be6bf307ed19ce8dc8cd311d24aeb6e5b9861 (diff)
downloadgitea-25cacaf0aa56bece904c84638fbe126a826c1cd8.tar.gz
gitea-25cacaf0aa56bece904c84638fbe126a826c1cd8.zip
Fixed Issue of Review Menu Shown Behind (#32631)
Fixed #31144 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/diff/box.tmpl30
1 files changed, 14 insertions, 16 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 26737f110e..20e0c9db66 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -164,24 +164,22 @@
<input type="checkbox" name="{{$file.GetDiffFileName}}" autocomplete="off"{{if $file.IsViewed}} checked{{end}}> {{ctx.Locale.Tr "repo.pulls.has_viewed_file"}}
</label>
{{end}}
- <div class="ui dropdown basic">
- {{svg "octicon-kebab-horizontal" 18 "icon tw-mx-2"}}
- <div class="ui menu">
- {{if not (or $file.IsIncomplete $file.IsBin $file.IsSubmodule)}}
- <button class="unescape-button item">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
- <button class="escape-button tw-hidden item">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
- {{end}}
- {{if and (not $file.IsSubmodule) (not $.PageIsWiki)}}
- {{if $file.IsDeleted}}
- <a class="item" rel="nofollow" href="{{$.BeforeSourcePath}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
- {{else}}
- <a class="item" rel="nofollow" href="{{$.SourcePath}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
- {{if and $.Repository.CanEnableEditor $.CanEditFile (not $file.IsLFSFile) (not $file.IsBin)}}
- <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>
- {{end}}
+ <button class="btn diff-header-popup-btn tw-p-1">{{svg "octicon-kebab-horizontal" 18}}</button>
+ <div class="tippy-target">
+ {{if not (or $file.IsIncomplete $file.IsBin $file.IsSubmodule)}}
+ <button class="unescape-button item" data-file-content-elem-id="diff-{{$file.NameHash}}">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</button>
+ <button class="escape-button tw-hidden item" data-file-content-elem-id="diff-{{$file.NameHash}}">{{ctx.Locale.Tr "repo.escape_control_characters"}}</button>
+ {{end}}
+ {{if and (not $file.IsSubmodule) (not $.PageIsWiki)}}
+ {{if $file.IsDeleted}}
+ <a class="item" rel="nofollow" href="{{$.BeforeSourcePath}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
+ {{else}}
+ <a class="item" rel="nofollow" href="{{$.SourcePath}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
+ {{if and $.Repository.CanEnableEditor $.CanEditFile (not $file.IsLFSFile) (not $file.IsBin)}}
+ <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>
{{end}}
{{end}}
- </div>
+ {{end}}
</div>
</div>
</h4>