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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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="ui secondary menu">
  11. <div class="fitted item treepath">
  12. <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
  13. {{.locale.Tr "repo.editor.patching"}}
  14. <a class="section" href="{{$.RepoLink}}">{{.Repository.FullName}}</a>
  15. <div class="divider">:</div>
  16. <a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
  17. <span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
  18. <input type="hidden" id="tree_path" name="tree_path" value="" required>
  19. <input id="file-name" type="hidden" value="diff.patch">
  20. </div>
  21. </div>
  22. </div>
  23. <div class="field">
  24. <div class="ui top attached tabular menu" data-write="write">
  25. <a class="active item" data-tab="write">{{svg "octicon-code" 16 "gt-mr-2"}}{{.locale.Tr "repo.editor.new_patch"}}</a>
  26. </div>
  27. <div class="ui bottom attached active tab segment" data-tab="write">
  28. <textarea id="edit_area" name="content" class="gt-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 class="ui small basic modal" id="edit-empty-content-modal">
  39. <div class="ui icon header">
  40. <i class="file icon"></i>
  41. {{.locale.Tr "repo.editor.commit_empty_file_header"}}
  42. </div>
  43. <div class="center content">
  44. <p>{{.locale.Tr "repo.editor.commit_empty_file_text"}}</p>
  45. </div>
  46. <div class="actions">
  47. <div class="ui red basic cancel inverted button">
  48. <i class="remove icon"></i>
  49. {{.locale.Tr "repo.editor.cancel"}}
  50. </div>
  51. <div class="ui green basic ok inverted button">
  52. <i class="save icon"></i>
  53. {{.locale.Tr "repo.editor.commit_changes"}}
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. {{template "base/footer" .}}