edit.tmpl 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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.edit_release"}}</h4>
  10. <form class="form" id="release-new-form" action="{{.RepoLink}}/releases/edit/{{.Release.TagName}}" method="post">
  11. {{.CsrfTokenHtml}}
  12. <div class="field">
  13. <b>{{.Release.TagName}}</b>
  14. <span class="target-at">@</span>
  15. <strong>{{.Repository.DefaultBranch}}</strong>
  16. </div>
  17. <div class="field">
  18. <input class="ipt ipt-large ipt-radius grid-4-5" id="release-new-title" name="title" placeholder="{{.i18n.Tr "repo.release.release_title"}}" value="{{.Release.Title}}" required>
  19. </div>
  20. <br>
  21. <div class="field grid-4-5">
  22. <div class="md-help pull-right">
  23. {{.i18n.Tr "repo.release.content_with_md" "https://help.github.com/articles/markdown-basics" | Str2html}}
  24. </div>
  25. <div class="clear">
  26. <ul class="tab-nav list-unstyled">
  27. <li class="js-tab-nav js-tab-nav-show left" data-tab-target="#release-textarea">
  28. <button class="btn btn-medium btn-gray btn-left-radius">{{.i18n.Tr "repo.release.write"}}</button>
  29. </li>
  30. <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">
  31. <button class="btn btn-medium btn-gray btn-right-radius">{{.i18n.Tr "repo.release.preview"}}</button>
  32. </li>
  33. </ul>
  34. </div>
  35. <div id="release-textarea">
  36. <div class="form-group">
  37. <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>{{.Release.Note}}</textarea>
  38. </div>
  39. </div>
  40. <div class="markdown hide" id="release-preview">{{.i18n.Tr "repo.release.loading"}}</div>
  41. <br>
  42. <hr>
  43. <div class="text-right">
  44. <input class="ipt-chk" name="prerelease" type="checkbox" {{if .Release.IsPrerelease}}checked{{end}}/>
  45. <span><strong>{{.i18n.Tr "repo.release.prerelease_desc"}}</strong></span>
  46. <p>{{.i18n.Tr "repo.release.prerelease_helper"}}</p>
  47. <button class="btn btn-large btn-green btn-radius">Publish release</button>
  48. {{if .Release.IsDraft}}
  49. <input class="btn btn-large btn-gary btn-radius" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/>
  50. {{end}}
  51. </div>
  52. </div>
  53. </form>
  54. </div>
  55. </div>
  56. {{template "repo/sidebar" .}}
  57. </div>
  58. </div>
  59. {{template "ng/base/footer" .}}