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.

69 lines
4.2 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. {{template "repo/nav" .}}
  4. {{template "repo/toolbar" .}}
  5. <div id="body" class="container">
  6. <div id="release">
  7. <h4 id="release-head">New Release</h4>
  8. {{template "base/alert" .}}
  9. <form id="release-new-form" action="{{.RepoLink}}/releases/new" method="post" class="form form-inline">
  10. {{.CsrfTokenHtml}}
  11. <div class="form-group">
  12. <input id="tag-name" name="tag_name" type="text" class="form-control" placeholder="tag name" value="{{.tag_name}}" />
  13. <span class="target-at">@</span>
  14. <div class="btn-group" id="release-new-target-select">
  15. <button type="button" class="btn btn-default"><i class="fa fa-code-fork fa-lg fa-m"></i>
  16. <span class="target-text">Target : </span>
  17. <strong id="release-new-target-name"> {{.Repository.DefaultBranch}}</strong>
  18. </button>
  19. <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
  20. <span class="caret"></span>
  21. </button>
  22. <div class="dropdown-menu clone-group-btn" id="release-new-target-branch-list">
  23. <ul class="list-group">
  24. {{range .Branches}}
  25. <li class="list-group-item">
  26. <a href="#" rel="{{.}}"><i class="fa fa-code-fork"></i>{{.}}</a>
  27. </li>
  28. {{end}}
  29. </ul>
  30. </div>
  31. <input id="tag-target" type="hidden" name="tag_target" value="{{.Repository.DefaultBranch}}"/>
  32. </div>
  33. <p class="help-block">Choose an existing tag, or create a new tag on publish</p>
  34. </div>
  35. <div class="form-group" style="display: block">
  36. <input class="form-control input-lg" id="release-new-title" name="title" type="text" placeholder="release title" value="{{.title}}" />
  37. </div>
  38. <div class="form-group col-md-8" style="display: block" id="release-new-content-div">
  39. <div class="md-help pull-right">
  40. Content with <a href="https://help.github.com/articles/markdown-basics">Markdown</a>
  41. </div>
  42. <ul class="nav nav-tabs" data-init="tabs">
  43. <li class="release-write active"><a href="#release-textarea" data-toggle="tab">Write</a></li>
  44. <li class="release-preview"><a href="#release-preview" data-toggle="tab" data-ajax="/api/v1/markdown?repo=repo_id&amp;release=new" data-ajax-name="release-preview" data-ajax-method="post" data-preview="#release-preview">Preview</a></li>
  45. </ul>
  46. <div class="tab-content">
  47. <div class="tab-pane active" id="release-textarea">
  48. <div class="form-group">
  49. <textarea class="form-control" name="content" id="release-new-content" rows="10" placeholder="Write some content" data-ajax-rel="release-preview" data-ajax-val="val" data-ajax-field="content">{{.content}}</textarea>
  50. </div>
  51. </div>
  52. <div class="tab-pane release-preview-content" id="release-preview">loading...</div>
  53. </div>
  54. </div>
  55. <div class="text-right form-group col-md-8" style="display: block">
  56. <hr/>
  57. <label for="release-new-pre-release">
  58. <input id="release-new-pre-release" type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}/>
  59. <strong>This is a pre-release</strong>
  60. </label>
  61. <p class="help-block">We’ll point out that this release is identified as non-production ready.</p>
  62. </div>
  63. <div class="text-right form-group col-md-8" style="display: block">
  64. <button class="btn-success btn">Publish release</button>
  65. <!-- <input class="btn btn-default" type="submit" name="draft" value="Save Draft"/> -->
  66. </div>
  67. </form>
  68. </div>
  69. </div>
  70. {{template "base/footer" .}}