You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

patch.tmpl 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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" method="post" action="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}">
  7. {{.CsrfTokenHtml}}
  8. <input type="hidden" name="last_commit" value="{{.last_commit}}">
  9. <input type="hidden" name="page_has_posted" value="{{.PageHasPosted}}">
  10. <div class="repo-editor-header">
  11. <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
  12. {{ctx.Locale.Tr "repo.editor.patching"}}
  13. <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
  14. <div class="breadcrumb-divider">:</div>
  15. <a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
  16. <span>{{ctx.Locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{ctx.Locale.Tr "repo.editor.cancel_lower"}}</a></span>
  17. <input type="hidden" id="tree_path" name="tree_path" value="" required>
  18. <input id="file-name" maxlength="500" type="hidden" value="diff.patch">
  19. </div>
  20. </div>
  21. <div class="field">
  22. <div class="ui top attached tabular menu" data-write="write">
  23. <a class="active item" data-tab="write">{{svg "octicon-code" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.editor.new_patch"}}</a>
  24. </div>
  25. <div class="ui bottom attached active tab segment" data-tab="write">
  26. <textarea id="edit_area" name="content" class="gt-hidden" data-id="repo-{{.Repository.Name}}-patch"
  27. data-context="{{.RepoLink}}"
  28. data-line-wrap-extensions="{{.LineWrapExtensions}}">
  29. {{.FileContent}}</textarea>
  30. <div class="editor-loading is-loading"></div>
  31. </div>
  32. </div>
  33. {{template "repo/editor/commit_form" .}}
  34. </form>
  35. </div>
  36. <div class="ui g-modal-confirm modal" id="edit-empty-content-modal">
  37. <div class="header">
  38. {{svg "octicon-file"}}
  39. {{ctx.Locale.Tr "repo.editor.commit_empty_file_header"}}
  40. </div>
  41. <div class="center content">
  42. <p>{{ctx.Locale.Tr "repo.editor.commit_empty_file_text"}}</p>
  43. </div>
  44. <div class="actions">
  45. <button class="ui cancel button">
  46. {{svg "octicon-x"}}
  47. {{ctx.Locale.Tr "repo.editor.cancel"}}
  48. </button>
  49. <button class="ui primary ok button">
  50. {{svg "fontawesome-save"}}
  51. {{ctx.Locale.Tr "repo.editor.commit_changes"}}
  52. </button>
  53. </div>
  54. </div>
  55. </div>
  56. {{template "base/footer" .}}