milestone_new.tmpl 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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="issue">
  7. <form class="form" action="{{.RepoLink}}/issues/milestones/new" method="post" id="issue-create-form">
  8. {{.CsrfTokenHtml}}
  9. {{template "base/alert" .}}
  10. <div class="col-md-1">
  11. <img class="avatar" src="{{.SignedUser.AvatarLink}}" alt=""/>
  12. </div>
  13. <div class="col-md-8 panel panel-default">
  14. <div class="form-group panel-body">
  15. <input class="form-control input-lg" type="text" name="title" required="required" placeholder="Title" value="{{.title}}" />
  16. </div>
  17. <div class="form-group panel-body">
  18. <div class="md-help pull-right"><!-- todo help link -->
  19. Content with <a href="https://help.github.com/articles/markdown-basics">Markdown</a>
  20. </div>
  21. <ul class="nav nav-tabs" data-init="tabs">
  22. <li class="active issue-write"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
  23. <li class="issue-preview"><a href="#issue-preview" data-toggle="tab" data-ajax="/api/v1/markdown" data-ajax-name="issue-preview" data-ajax-context="{{.RepoLink}}" data-ajax-method="post" data-preview="#issue-preview">Preview</a></li>
  24. </ul>
  25. <div class="tab-content">
  26. <div class="tab-pane" id="issue-textarea">
  27. <div class="form-group">
  28. <textarea class="form-control" name="content" id="issue-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-preview" data-ajax-val="val" data-ajax-field="text">{{.content}}</textarea>
  29. </div>
  30. </div>
  31. <div class="tab-pane issue-preview-content" id="issue-preview">loading...</div>
  32. </div>
  33. </div>
  34. <div class="text-right panel-body">
  35. <div class="form-group">
  36. <input type="hidden" value="id" name="repo-id"/>
  37. <button class="btn-success btn">Create new milestone</button>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="col-md-3">
  42. <h4>Milestone Due Date</h4>
  43. <div class="form-group">
  44. <input name="due_date" type="text" class="form-control" id="milestone-due-date">
  45. </div>
  46. </div>
  47. </form>
  48. </div>
  49. </div>
  50. <script src="/js/bootstrap-datepicker.js"></script>
  51. <script>
  52. $(function(){
  53. $('#milestone-due-date').datepicker({
  54. weekStart: 1,
  55. todayBtn: "linked",
  56. calendarWeeks: true,
  57. todayHighlight: true
  58. });
  59. });
  60. </script>
  61. {{template "base/footer" .}}