|
75 | 75 | </div> |
76 | 76 |
|
77 | 77 | <!-- Project --> |
78 | | - <div class="ui {{if not .Projects}}disabled{{end}} dropdown jump item"> |
| 78 | + <div class="ui{{if not (or .OpenProjects .ClosedProjects)}} disabled{{end}} dropdown jump item"> |
79 | 79 | <span class="text"> |
80 | | - {{.locale.Tr "repo.issues.filter_project"}} |
| 80 | + {{.locale.Tr "repo.issues.filter_projects"}} |
81 | 81 | {{svg "octicon-triangle-down" 14 "dropdown icon"}} |
82 | 82 | </span> |
83 | 83 | <div class="menu"> |
84 | 84 | <div class="ui icon search input"> |
85 | 85 | <i class="icon df ac jc">{{svg "octicon-search" 16}}</i> |
86 | | - <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_project"}}"> |
| 86 | + <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_projects"}}"> |
87 | 87 | </div> |
88 | | - <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_project_no_select"}}</a> |
89 | | - {{range .Projects}} |
90 | | - <a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{.ID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.Title}}</a> |
| 88 | + <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_project_all"}}</a> |
| 89 | + <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&project=-1&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_project_none"}}</a> |
| 90 | + {{if .OpenProjects}} |
| 91 | + <div class="divider"></div> |
| 92 | + <div class="header"> |
| 93 | + {{.locale.Tr "repo.issues.new.open_projects"}} |
| 94 | + </div> |
| 95 | + {{range .OpenProjects}} |
| 96 | + <a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{.ID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}"> |
| 97 | + {{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "mr-3"}}{{else}}{{svg "octicon-project" 18 "mr-3"}}{{end}} |
| 98 | + {{.Title}} |
| 99 | + </a> |
| 100 | + {{end}} |
| 101 | + {{end}} |
| 102 | + {{if .ClosedProjects}} |
| 103 | + <div class="divider"></div> |
| 104 | + <div class="header"> |
| 105 | + {{.locale.Tr "repo.issues.new.closed_projects"}} |
| 106 | + </div> |
| 107 | + {{range .ClosedProjects}} |
| 108 | + <a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{.ID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}"> |
| 109 | + {{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "mr-3"}}{{else}}{{svg "octicon-project" 18 "mr-3"}}{{end}} |
| 110 | + {{.Title}} |
| 111 | + </a> |
| 112 | + {{end}} |
91 | 113 | {{end}} |
92 | 114 | </div> |
93 | 115 | </div> |
|
222 | 244 | </div> |
223 | 245 |
|
224 | 246 | <!-- Projects --> |
225 | | - <div class="ui {{if not .Projects}}disabled{{end}} dropdown jump item"> |
| 247 | + <div class="ui{{if not (or .OpenProjects .ClosedProjects)}} disabled{{end}} dropdown jump item"> |
226 | 248 | <span class="text"> |
227 | 249 | {{.locale.Tr "repo.project_board"}} |
228 | 250 | {{svg "octicon-triangle-down" 14 "dropdown icon"}} |
229 | 251 | </span> |
230 | 252 | <div class="menu"> |
231 | 253 | <div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/projects"> |
232 | | - {{.locale.Tr "repo.issues.new.no_projects"}} |
| 254 | + {{.locale.Tr "repo.issues.new.clear_projects"}} |
233 | 255 | </div> |
234 | | - {{range .Projects}} |
235 | | - <div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/projects"> |
236 | | - {{.Title}} |
| 256 | + {{if .OpenProjects}} |
| 257 | + <div class="divider"></div> |
| 258 | + <div class="header"> |
| 259 | + {{.locale.Tr "repo.issues.new.open_projects"}} |
| 260 | + </div> |
| 261 | + {{range .OpenProjects}} |
| 262 | + <div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/projects"> |
| 263 | + {{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "mr-3"}}{{else}}{{svg "octicon-project" 18 "mr-3"}}{{end}} |
| 264 | + {{.Title}} |
| 265 | + </div> |
| 266 | + {{end}} |
| 267 | + {{end}} |
| 268 | + {{if .ClosedProjects}} |
| 269 | + <div class="divider"></div> |
| 270 | + <div class="header"> |
| 271 | + {{.locale.Tr "repo.issues.new.closed_projects"}} |
| 272 | + </div> |
| 273 | + {{range .ClosedProjects}} |
| 274 | + <div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/projects"> |
| 275 | + {{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "mr-3"}}{{else}}{{svg "octicon-project" 18 "mr-3"}}{{end}} |
| 276 | + {{.Title}} |
| 277 | + </div> |
| 278 | + {{end}} |
237 | 279 | </div> |
238 | 280 | {{end}} |
239 | 281 | </div> |
|
0 commit comments