fix(web): populate the reason for "cannot commit to branch" in web editor commit form (#39155)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Nitish-1303
2026-08-29 03:16:58 +05:30
committed by GitHub
parent 60326ca03d
commit e806566b39
12 changed files with 54 additions and 51 deletions
+1 -1
View File
@@ -160,7 +160,7 @@
<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}}
{{if and $.Repository.CanContentChange $.CanEditFile}}
<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}}