new.tmpl 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="repo-wrapper">
  4. {{template "repo/header_old" .}}
  5. <div id="repo-content" class="clear container">
  6. <div id="repo-main" class="left grid-5-6">
  7. {{template "ng/base/alert" .}}
  8. <div id="release">
  9. <h4 id="release-head">{{.i18n.Tr "repo.release.new_release"}}</h4>
  10. <form class="form" id="release-new-form" action="{{.RepoLink}}/releases/new" method="post">
  11. {{.CsrfTokenHtml}}
  12. <div class="field">
  13. <input class="ipt ipt-large ipt-radius" name="tag_name" value="{{.tag_name}}" placeholder="{{.i18n.Tr "repo.release.tag_name"}}" required>
  14. <span class="target-at">@</span>
  15. <div class="inline-block drop">
  16. <button class="btn btn-gray btn-medium btn-radius drop-bottom">
  17. <i class="octicon octicon-git-branch"></i> {{.i18n.Tr "repo.release.target"}} :
  18. <strong id="repo-branch-current">{{.Repository.DefaultBranch}}</strong>
  19. </button>
  20. <ul class="drop-down menu menu-vertical menu-radius switching-list" id="release-new-target-branch-list">
  21. {{range .Branches}}
  22. <li {{if eq . $.tag_target}}class="checked"{{end}}><a><i class="octicon octicon-check"></i>{{.}}</a></li>
  23. {{end}}
  24. </ul>
  25. </div>
  26. <input id="tag-target" type="hidden" name="tag_target" value="{{.tag_target}}"/>
  27. </div>
  28. <p class="help">{{.i18n.Tr "repo.release.tag_helper"}}</p>
  29. <div class="field">
  30. <input class="ipt ipt-large ipt-radius grid-4-5" id="release-new-title" name="title" placeholder="{{.i18n.Tr "repo.release.release_title"}}" value="{{.title}}" required>
  31. </div>
  32. <br>
  33. <div class="field grid-4-5">
  34. <div class="md-help pull-right">
  35. {{.i18n.Tr "repo.release.content_with_md" "https://help.github.com/articles/markdown-basics" | Str2html}}
  36. </div>
  37. <div class="clear">
  38. <ul class="tab-nav list-unstyled">
  39. <li class="js-tab-nav js-tab-nav-show left" data-tab-target="#release-textarea">
  40. <button class="btn btn-medium btn-gray btn-left-radius">{{.i18n.Tr "repo.release.write"}}</button>
  41. </li>
  42. <li class="js-tab-nav left markdown-preview" id="release-preview-btn" data-tab-target="#release-preview" data-ajax="/api/v1/markdown" data-ajax-name="release-preview" data-ajax-context="{{.RepoLink}}" data-ajax-method="post" data-preview="#release-preview">
  43. <button class="btn btn-medium btn-gray btn-right-radius">{{.i18n.Tr "repo.release.preview"}}</button>
  44. </li>
  45. </ul>
  46. </div>
  47. <div id="release-textarea">
  48. <div class="form-group">
  49. <textarea class="ipt ipt-large ipt-radius" name="content" id="release-new-content" rows="10" placeholder="{{.i18n.Tr "repo.release.content_placeholder"}}" data-ajax-rel="release-preview" data-ajax-val="val" data-ajax-field="text" required>{{.content}}</textarea>
  50. </div>
  51. </div>
  52. <div class="markdown hide" id="release-preview">{{.i18n.Tr "repo.release.loading"}}</div>
  53. <hr>
  54. <div class="text-right">
  55. <input class="ipt-chk" name="prerelease" type="checkbox" {{if .prerelease}}checked{{end}}/>
  56. <span><strong>{{.i18n.Tr "repo.release.prerelease_desc"}}</strong></span>
  57. <p>{{.i18n.Tr "repo.release.prerelease_helper"}}</p>
  58. <button class="btn btn-large btn-green btn-radius">{{.i18n.Tr "repo.release.publish"}}</button>
  59. <input class="btn btn-large btn-gary btn-radius" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/>
  60. </div>
  61. </div>
  62. </form>
  63. </div>
  64. </div>
  65. {{template "repo/sidebar" .}}
  66. </div>
  67. </div>
  68. {{template "ng/base/footer" .}}