1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-17 23:54:25 +00:00
gitea/templates/repo/editor/cherry_pick.tmpl
Gusted d55a0b7238
Refactor i18n to locale (#20153)
* Refactor `i18n` to `locale`

- Currently we're using the `i18n` variable naming for the `locale`
struct. This contains locale's specific information and cannot be used
for general i18n purpose, therefore refactoring it to `locale` makes
more sense.
- Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200

* Update routers/install/install.go
2022-06-27 15:58:46 -05:00

33 lines
1.5 KiB
Handlebars

{{template "base/head" .}}
<div 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="ui secondary menu">
<div class="fitted item treepath">
<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"}}
{{.locale.Tr "repo.editor.revert" $shalink | Str2html}}
{{else}}
{{.locale.Tr "repo.editor.cherry_pick" $shalink | Str2html}}
{{end}}
<a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
<div class="divider">:</div>
<a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
<span>{{.locale.Tr "repo.editor.or"}} <a href="{{$shaurl}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
</div>
</div>
</div>
{{template "repo/editor/commit_form" .}}
</form>
</div>
</div>
{{template "base/footer" .}}