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.

43 lines
2.4 KiB

  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/new" method="post" id="issue-create-form">
  8. {{.CsrfTokenHtml}}
  9. <div class="col-md-1">
  10. <img class="avatar" src="{{.SignedUser.AvatarLink}}" alt=""/>
  11. </div>
  12. <div class="col-md-8 panel panel-default">
  13. <div class="form-group panel-body">
  14. <input class="form-control input-lg" type="text" name="title" required="required" placeholder="Title" value="{{.title}}" />
  15. </div>
  16. <div class="form-group panel-body">
  17. <div class="md-help pull-right"><!-- todo help link -->
  18. Content with <a href="https://help.github.com/articles/markdown-basics">Markdown</a>
  19. </div>
  20. <ul class="nav nav-tabs" data-init="tabs">
  21. <li class="active issue-write"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
  22. <li class="issue-preview"><a href="#issue-preview" data-toggle="tab" data-ajax="/api/v1/markdown?repoLink={{.RepoLink}}" data-ajax-name="issue-preview" data-ajax-method="post" data-preview="#issue-preview">Preview</a></li>
  23. </ul>
  24. <div class="tab-content">
  25. <div class="tab-pane" id="issue-textarea">
  26. <div class="form-group">
  27. <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="content">{{.content}}</textarea>
  28. </div>
  29. </div>
  30. <div class="tab-pane issue-preview-content" id="issue-preview">loading...</div>
  31. </div>
  32. </div>
  33. <div class="text-right panel-body">
  34. <div class="form-group">
  35. <input type="hidden" value="id" name="repo-id"/>
  36. <button class="btn-success btn">Create new issue</button>
  37. </div>
  38. </div>
  39. </div>
  40. </form>
  41. </div>
  42. </div>
  43. {{template "base/footer" .}}