1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-26 18:20:57 +00:00

[GITEA] pulls: "Edit File" button in "Files Changed" tab

Closes #1894.
Gitea issue: https://github.com/go-gitea/gitea/issues/23848

(cherry picked from commit 79c75164ca)
(cherry picked from commit 58c76aad8f)
(cherry picked from commit 5bdb3c6c53)
(cherry picked from commit 94e954ce22)
This commit is contained in:
Antonin Delpeuch 2023-12-19 22:18:07 +01:00 committed by Earl Warren
parent 23c887f97e
commit 1388e7c7be
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
4 changed files with 43 additions and 8 deletions

View file

@ -166,6 +166,9 @@
<a class="ui basic tiny button" rel="nofollow" href="{{$.BeforeSourcePath}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
{{else}}
<a class="ui basic tiny button" rel="nofollow" href="{{$.SourcePath}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
{{if and $.HeadBranchIsEditable (not $file.IsLFSFile)}}
<a class="ui basic tiny button" rel="nofollow" href="{{$.SourceRepoLink}}/_edit/{{PathEscapeSegments $.HeadBranch}}/{{PathEscapeSegments .Name}}">{{ctx.Locale.Tr "repo.editor.edit_this_file"}}</a>
{{end}}
{{end}}
{{end}}
{{if $isReviewFile}}