gitea源码

cherry_pick.tmpl 1.3KB

123456789101112131415161718192021222324252627282930
  1. {{template "base/head" .}}
  2. <div role="main" aria-label="{{.Title}}" class="page-content repository file editor edit">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. <form class="ui edit form form-fetch-action" method="post" action="{{.CommitFormOptions.TargetFormAction}}">
  7. {{.CsrfTokenHtml}}
  8. {{template "repo/editor/common_top" .}}
  9. <input type="hidden" name="revert" value="{{if eq .CherryPickType "revert"}}true{{else}}false{{end}}">
  10. <div class="repo-editor-header">
  11. <div class="breadcrumb">
  12. {{$shaurl := printf "%s/commit/%s" $.RepoLink (PathEscape .FromCommitID)}}
  13. {{$shalink := HTMLFormat `<a class="ui primary sha label" href="%s">%s</a>` $shaurl (ShortSha .FromCommitID)}}
  14. {{if eq .CherryPickType "revert"}}
  15. {{ctx.Locale.Tr "repo.editor.revert" $shalink}}
  16. {{else}}
  17. {{ctx.Locale.Tr "repo.editor.cherry_pick" $shalink}}
  18. {{end}}
  19. <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
  20. <div class="breadcrumb-divider">:</div>
  21. <a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
  22. <span>{{ctx.Locale.Tr "repo.editor.or"}} <a href="{{$shaurl}}">{{ctx.Locale.Tr "repo.editor.cancel_lower"}}</a></span>
  23. </div>
  24. </div>
  25. {{template "repo/editor/commit_form" .}}
  26. </form>
  27. </div>
  28. </div>
  29. {{template "base/footer" .}}