gitea源码

patch.tmpl 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. data-text-empty-confirm-header="{{ctx.Locale.Tr "repo.editor.commit_empty_file_header"}}"
  8. data-text-empty-confirm-content="{{ctx.Locale.Tr "repo.editor.commit_empty_file_text"}}"
  9. >
  10. {{.CsrfTokenHtml}}
  11. {{template "repo/editor/common_top" .}}
  12. <div class="repo-editor-header">
  13. <div class="breadcrumb">
  14. {{ctx.Locale.Tr "repo.editor.patching"}}
  15. <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
  16. <div class="breadcrumb-divider">:</div>
  17. <a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
  18. <span>{{ctx.Locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{ctx.Locale.Tr "repo.editor.cancel_lower"}}</a></span>
  19. <input type="hidden" name="tree_path" value="__dummy_for_EditRepoFileForm.TreePath(Required)__">
  20. <input id="file-name" type="hidden" value="diff.patch">
  21. </div>
  22. </div>
  23. <div class="field">
  24. <div class="ui compact small menu small-menu-items repo-editor-menu">
  25. <a class="active item" data-tab="write">{{svg "octicon-code" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.editor.new_patch"}}</a>
  26. </div>
  27. <div class="ui active tab segment tw-rounded tw-p-0" data-tab="write">
  28. <textarea id="edit_area" name="content" class="tw-hidden" data-id="repo-{{.Repository.Name}}-patch"
  29. data-context="{{.RepoLink}}"
  30. data-line-wrap-extensions="{{.LineWrapExtensions}}">
  31. {{.FileContent}}</textarea>
  32. <div class="editor-loading is-loading"></div>
  33. </div>
  34. </div>
  35. {{template "repo/editor/commit_form" .}}
  36. </form>
  37. </div>
  38. </div>
  39. {{template "base/footer" .}}