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.

123 lines
4.9 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. <form class="ui comment form stackable 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.RelAvatarLink}}">
  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. {{template "repo/issue/branch_selector_field" .}}
  35. <input id="label_ids" name="label_ids" type="hidden" value="{{.label_ids}}">
  36. <div class="ui {{if not .Labels}}disabled{{end}} floating jump select-label dropdown">
  37. <span class="text">
  38. <strong>{{.i18n.Tr "repo.issues.new.labels"}}</strong>
  39. <span class="octicon octicon-gear"></span>
  40. </span>
  41. <div class="filter menu" data-id="#label_ids">
  42. <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
  43. {{range .Labels}}
  44. <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>
  45. {{end}}
  46. </div>
  47. </div>
  48. <div class="ui labels list">
  49. <span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_label"}}</span>
  50. {{range .Labels}}
  51. <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>
  52. {{end}}
  53. </div>
  54. <div class="ui divider"></div>
  55. <input id="milestone_id" name="milestone_id" type="hidden" value="{{.milestone_id}}">
  56. <div class="ui {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}} floating jump select-milestone dropdown">
  57. <span class="text">
  58. <strong>{{.i18n.Tr "repo.issues.new.milestone"}}</strong>
  59. <span class="octicon octicon-gear"></span>
  60. </span>
  61. <div class="menu">
  62. <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
  63. {{if .OpenMilestones}}
  64. <div class="divider"></div>
  65. <div class="header">
  66. <i class="octicon octicon-milestone"></i>
  67. {{.i18n.Tr "repo.issues.new.open_milestone"}}
  68. </div>
  69. {{range .OpenMilestones}}
  70. <div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
  71. {{end}}
  72. {{end}}
  73. {{if .ClosedMilestones}}
  74. <div class="divider"></div>
  75. <div class="header">
  76. <i class="octicon octicon-milestone"></i>
  77. {{.i18n.Tr "repo.issues.new.closed_milestone"}}
  78. </div>
  79. {{range .ClosedMilestones}}
  80. <a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
  81. {{end}}
  82. {{end}}
  83. </div>
  84. </div>
  85. <div class="ui select-milestone list">
  86. <span class="no-select item {{if .Milestone}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_milestone"}}</span>
  87. <div class="selected">
  88. {{if .Milestone}}
  89. <a class="item" href="{{.RepoLink}}/issues?milestone={{.Milestone.ID}}"> {{.Milestone.Name}}</a>
  90. {{end}}
  91. </div>
  92. </div>
  93. <div class="ui divider"></div>
  94. <input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
  95. <div class="ui {{if not .Assignees}}disabled{{end}} floating jump select-assignee dropdown">
  96. <span class="text">
  97. <strong>{{.i18n.Tr "repo.issues.new.assignee"}}</strong>
  98. <span class="octicon octicon-gear"></span>
  99. </span>
  100. <div class="menu">
  101. <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div>
  102. {{range .Assignees}}
  103. <div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?assignee={{.ID}}" data-avatar="{{.RelAvatarLink}}"><img src="{{.RelAvatarLink}}"> {{.Name}}</div>
  104. {{end}}
  105. </div>
  106. </div>
  107. <div class="ui select-assignee list">
  108. <span class="no-select item {{if .Assignee}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_assignee"}}</span>
  109. <div class="selected">
  110. {{if .Assignee}}
  111. <a class="item" href="{{.RepoLink}}/issues?assignee={{.Assignee.ID}}"><img class="ui avatar image" src="{{.Assignee.RelAvatarLink}}"> {{.Assignee.Name}}</a>
  112. {{end}}
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </form>