new_form.tmpl 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <form class="ui comment form grid" action="{{EscapePound .Link}}" method="post">
  2. {{.CsrfTokenHtml}}
  3. {{if .Flash}}
  4. <div class="sixteen wide column">
  5. {{template "base/alert" .}}
  6. </div>
  7. {{end}}
  8. <div class="twelve wide column">
  9. <div class="ui comments">
  10. <div class="comment">
  11. <a class="avatar" href="{{.SignedUser.HomeLink}}">
  12. <img src="{{.SignedUser.AvatarLink}}">
  13. </a>
  14. <div class="ui segment content">
  15. <div class="field">
  16. <input name="title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" tabindex="3" autofocus required>
  17. </div>
  18. {{template "repo/issue/comment_tab" .}}
  19. <div class="text right">
  20. <button class="ui green button" tabindex="6">
  21. {{if .PageIsComparePull}}
  22. {{.i18n.Tr "repo.pulls.create"}}
  23. {{else}}
  24. {{.i18n.Tr "repo.issues.create"}}
  25. {{end}}
  26. </button>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="four wide column">
  33. <div class="ui segment metas">
  34. <input id="label_ids" name="label_ids" type="hidden" value="{{.label_ids}}">
  35. <div class="ui {{if not .Labels}}disabled{{end}} floating jump select-label dropdown">
  36. <span class="text">
  37. <strong>{{.i18n.Tr "repo.issues.new.labels"}}</strong>
  38. <span class="octicon octicon-gear"></span>
  39. </span>
  40. <div class="filter menu" data-id="#label_ids">
  41. <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
  42. {{range .Labels}}
  43. <a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
  44. {{end}}
  45. </div>
  46. </div>
  47. <div class="ui labels list">
  48. <span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_label"}}</span>
  49. {{range .Labels}}
  50. <a class="{{if not .IsChecked}}hide{{end}} item" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}"><span class="label color" style="background-color: {{.Color}}"></span> <span class="text">{{.Name}}</span></a>
  51. {{end}}
  52. </div>
  53. <div class="ui divider"></div>
  54. <input id="milestone_id" name="milestone_id" type="hidden" value="{{.milestone_id}}">
  55. <div class="ui {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}} floating jump select-milestone dropdown">
  56. <span class="text">
  57. <strong>{{.i18n.Tr "repo.issues.new.milestone"}}</strong>
  58. <span class="octicon octicon-gear"></span>
  59. </span>
  60. <div class="menu">
  61. <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
  62. {{if .OpenMilestones}}
  63. <div class="divider"></div>
  64. <div class="header">
  65. <i class="octicon octicon-milestone"></i>
  66. {{.i18n.Tr "repo.issues.new.open_milestone"}}
  67. </div>
  68. {{range .OpenMilestones}}
  69. <div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
  70. {{end}}
  71. {{end}}
  72. {{if .ClosedMilestones}}
  73. <div class="divider"></div>
  74. <div class="header">
  75. <i class="octicon octicon-milestone"></i>
  76. {{.i18n.Tr "repo.issues.new.closed_milestone"}}
  77. </div>
  78. {{range .ClosedMilestones}}
  79. <a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
  80. {{end}}
  81. {{end}}
  82. </div>
  83. </div>
  84. <div class="ui select-milestone list">
  85. <span class="no-select item {{if .Milestone}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_milestone"}}</span>
  86. <div class="selected">
  87. {{if .Milestone}}
  88. <a class="item" href="{{.RepoLink}}/issues?milestone={{.Milestone.ID}}"> {{.Milestone.Name}}</a>
  89. {{end}}
  90. </div>
  91. </div>
  92. <div class="ui divider"></div>
  93. <input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
  94. <div class="ui {{if not .Assignees}}disabled{{end}} floating jump select-assignee dropdown">
  95. <span class="text">
  96. <strong>{{.i18n.Tr "repo.issues.new.assignee"}}</strong>
  97. <span class="octicon octicon-gear"></span>
  98. </span>
  99. <div class="menu">
  100. <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div>
  101. {{range .Assignees}}
  102. <div class="item" data-id="{{.Id}}" data-href="{{$.RepoLink}}/issues?assignee={{.Id}}" data-avatar="{{.AvatarLink}}"><img src="{{.AvatarLink}}"> {{.Name}}</div>
  103. {{end}}
  104. </div>
  105. </div>
  106. <div class="ui select-assignee list">
  107. <span class="no-select item {{if .Assignee}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_assignee"}}</span>
  108. <div class="selected">
  109. {{if .Assignee}}
  110. <a class="item" href="{{.RepoLink}}/issues?assignee={{.Assignee.Id}}"><img class="ui avatar image" src="{{.Assignee.AvatarLink}}"> {{.Assignee.Name}}</a>
  111. {{end}}
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </form>