mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 08:59:31 -05:00
65248945c9
Clarify when "string" should be used (and be escaped), and when "template.HTML" should be used (no need to escape) And help PRs like #29059 , to render the error messages correctly. (cherry picked from commit f3eb835886031df7a562abc123c3f6011c81eca8) Conflicts: modules/web/middleware/binding.go routers/web/feed/convert.go tests/integration/branches_test.go tests/integration/repo_branch_test.go trivial context conflicts
30 lines
1.5 KiB
Go HTML Template
30 lines
1.5 KiB
Go HTML Template
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content repository file editor edit">
|
|
{{template "repo/header" .}}
|
|
<div class="ui container">
|
|
{{template "base/alert" .}}
|
|
<form class="ui edit form" method="post" action="{{.RepoLink}}/_cherrypick/{{.SHA}}/{{.BranchName | PathEscapeSegments}}">
|
|
{{.CsrfTokenHtml}}
|
|
<input type="hidden" name="last_commit" value="{{.last_commit}}">
|
|
<input type="hidden" name="page_has_posted" value="true">
|
|
<input type="hidden" name="revert" value="{{if eq .CherryPickType "revert"}}true{{else}}false{{end}}">
|
|
<div class="repo-editor-header">
|
|
<div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
|
|
{{$shaurl := printf "%s/commit/%s" $.RepoLink (PathEscape .SHA)}}
|
|
{{$shalink := printf `<a class="ui primary sha label" href="%s">%s</a>` (Escape $shaurl) (ShortSha .SHA)}}
|
|
{{if eq .CherryPickType "revert"}}
|
|
{{ctx.Locale.Tr "repo.editor.revert" ($shalink|Safe)}}
|
|
{{else}}
|
|
{{ctx.Locale.Tr "repo.editor.cherry_pick" ($shalink|Safe)}}
|
|
{{end}}
|
|
<a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
|
|
<div class="breadcrumb-divider">:</div>
|
|
<a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
|
|
<span>{{ctx.Locale.Tr "repo.editor.or"}} <a href="{{$shaurl}}">{{ctx.Locale.Tr "repo.editor.cancel_lower"}}</a></span>
|
|
</div>
|
|
</div>
|
|
{{template "repo/editor/commit_form" .}}
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{{template "base/footer" .}}
|