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.

milestone_issues.tmpl 9.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. {{template "base/head" .}}
  2. <div class="page-content repository">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="ui two column stackable grid">
  6. <div class="column">
  7. <h1>{{.Milestone.Name}}</h1>
  8. </div>
  9. {{if not .Repository.IsArchived}}
  10. <div class="column right aligned">
  11. {{if or .CanWriteIssues .CanWritePulls}}
  12. <a class="ui button" href="{{.RepoLink}}/milestones/{{.MilestoneID}}/edit">{{.i18n.Tr "repo.milestones.edit"}}</a>
  13. {{end}}
  14. <a class="ui primary button" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}?milestone={{.MilestoneID}}">{{.i18n.Tr "repo.issues.new"}}</a>
  15. </div>
  16. {{end}}
  17. </div>
  18. <div class="ui one column stackable grid">
  19. <div class="column markup content">
  20. {{.Milestone.RenderedContent|Str2html}}
  21. </div>
  22. </div>
  23. <div class="ui one column stackable grid">
  24. <div class="column">
  25. {{ $closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix $.i18n.Lang }}
  26. {{if .IsClosed}}
  27. {{svg "octicon-clock"}} {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
  28. {{else}}
  29. {{svg "octicon-calendar"}}
  30. {{if .Milestone.DeadlineString}}
  31. <span {{if .IsOverdue}}class="overdue"{{end}}>{{.Milestone.DeadlineString}}</span>
  32. {{else}}
  33. {{$.i18n.Tr "repo.milestones.no_due_date"}}
  34. {{end}}
  35. {{end}}
  36. &nbsp;
  37. <b>{{.i18n.Tr "repo.milestones.completeness" .Milestone.Completeness}}</b>
  38. </div>
  39. </div>
  40. <div class="ui divider"></div>
  41. <div id="issue-filters" class="ui stackable grid">
  42. <div class="six wide column">
  43. {{template "repo/issue/openclose" .}}
  44. </div>
  45. <div class="ten wide right aligned column">
  46. <div class="ui secondary filter stackable menu labels">
  47. <!-- Label -->
  48. <div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item label-filter" style="margin-left: auto">
  49. <span class="text">
  50. {{.i18n.Tr "repo.issues.filter_label"}}
  51. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  52. </span>
  53. <div class="menu">
  54. <span class="info">{{.i18n.Tr "repo.issues.filter_label_exclude" | Safe}}</span>
  55. <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_label_no_select"}}</a>
  56. {{range .Labels}}
  57. <a class="item label-filter-item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.QueryString}}&assignee={{$.AssigneeID}}" data-label-id="{{.ID}}">{{if .IsExcluded}}{{svg "octicon-circle-slash"}}{{else if contain $.SelLabelIDs .ID}}{{svg "octicon-check"}}{{end}}<span class="label color" style="background-color: {{.Color}}"></span> {{.Name | RenderEmoji}}</a>
  58. {{end}}
  59. </div>
  60. </div>
  61. <!-- Assignee -->
  62. <div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
  63. <span class="text">
  64. {{.i18n.Tr "repo.issues.filter_assignee"}}
  65. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  66. </span>
  67. <div class="menu">
  68. <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}">{{.i18n.Tr "repo.issues.filter_assginee_no_select"}}</a>
  69. {{range .Assignees}}
  70. <a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&assignee={{.ID}}">
  71. {{avatar . 28 "mr-2"}}
  72. {{.GetDisplayName}}
  73. </a>
  74. {{end}}
  75. </div>
  76. </div>
  77. {{if .IsSigned}}
  78. <!-- Type -->
  79. <div class="ui dropdown type jump item">
  80. <span class="text">
  81. {{.i18n.Tr "repo.issues.filter_type"}}
  82. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  83. </span>
  84. <div class="menu">
  85. <a class="{{if eq .ViewType "all"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type=all&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.all_issues"}}</a>
  86. <a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type=assigned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
  87. <a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type=created_by&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.created_by_you"}}</a>
  88. <a class="{{if eq .ViewType "mentioned"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type=mentioned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.mentioning_you"}}</a>
  89. <a class="{{if eq .ViewType "review_requested"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type=review_requested&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.review_requested"}}</a>
  90. </div>
  91. </div>
  92. {{end}}
  93. <!-- Sort -->
  94. <div class="ui dropdown type jump item">
  95. <span class="text">
  96. {{.i18n.Tr "repo.issues.filter_sort"}}
  97. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  98. </span>
  99. <div class="menu">
  100. <a class="{{if or (eq .SortType "latest") (not .SortType)}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=latest&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
  101. <a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=oldest&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
  102. <a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=recentupdate&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
  103. <a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=leastupdate&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
  104. <a class="{{if eq .SortType "mostcomment"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=mostcomment&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.mostcomment"}}</a>
  105. <a class="{{if eq .SortType "leastcomment"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=leastcomment&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.leastcomment"}}</a>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <div id="issue-actions" class="ui stackable grid hide">
  112. <div class="six wide column">
  113. {{template "repo/issue/openclose" .}}
  114. </div>
  115. {{/* Ten wide does not cope well and makes the columns stack.
  116. This seems to be related to jQuery's hide/show: in fact, switching
  117. issue-actions and issue-filters and having this ten wide will show
  118. this one correctly, but not the other one. */}}
  119. <div class="nine wide right aligned right floated column">
  120. <div class="ui secondary filter stackable menu">
  121. <!-- Action Button -->
  122. {{if .IsShowClosed}}
  123. <div class="ui green active basic button issue-action" data-action="open" data-url="{{$.RepoLink}}/issues/status" style="margin-left: auto">{{.i18n.Tr "repo.issues.action_open"}}</div>
  124. {{else}}
  125. <div class="ui red active basic button issue-action" data-action="close" data-url="{{$.RepoLink}}/issues/status" style="margin-left: auto">{{.i18n.Tr "repo.issues.action_close"}}</div>
  126. {{end}}
  127. <!-- Labels -->
  128. <div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item">
  129. <span class="text">
  130. {{.i18n.Tr "repo.issues.action_label"}}
  131. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  132. </span>
  133. <div class="menu">
  134. {{range .Labels}}
  135. <div class="item issue-action" data-action="toggle" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/labels">
  136. {{if contain $.SelLabelIDs .ID}}{{svg "octicon-check"}}{{end}}<span class="label color" style="background-color: {{.Color}}"></span> {{.Name | RenderEmoji}}
  137. </div>
  138. {{end}}
  139. </div>
  140. </div>
  141. <!-- Assignees -->
  142. <div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
  143. <span class="text">
  144. {{.i18n.Tr "repo.issues.action_assignee"}}
  145. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  146. </span>
  147. <div class="menu">
  148. <div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/assignee">
  149. {{.i18n.Tr "repo.issues.action_assignee_no_select"}}
  150. </div>
  151. {{range .Assignees}}
  152. <div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/assignee">
  153. {{avatar . 28 "mr-2"}}
  154. {{.GetDisplayName}}
  155. </div>
  156. {{end}}
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. {{template "shared/issuelist" mergeinto . "listType" "milestone"}}
  163. </div>
  164. </div>
  165. {{template "base/footer" .}}