|
5 | 5 | <div class="ui grid">
|
6 | 6 | <div class="four wide column">
|
7 | 7 | <div class="ui secondary vertical filter menu">
|
8 |
| - <a class="{{if eq .ViewType "all"}}ui basic blue button{{end}} item" href="{{.Link}}?repo={{.RepoID}}&state={{.State}}"> |
| 8 | + <a class="{{if eq .ViewType "all"}}ui basic blue button{{end}} item" href="{{.Link}}?repo={{.RepoID}}&sort={{$.SortType}}&state={{.State}}"> |
9 | 9 | {{.i18n.Tr "home.issues.in_your_repos"}}
|
10 | 10 | <strong class="ui right">{{.IssueStats.AllCount}}</strong>
|
11 | 11 | </a>
|
12 | 12 | {{if not .ContextUser.IsOrganization}}
|
13 |
| - <a class="{{if eq .ViewType "assigned"}}ui basic blue button{{end}} item" href="{{.Link}}?type=assigned&repo={{.RepoID}}&state={{.State}}"> |
| 13 | + <a class="{{if eq .ViewType "assigned"}}ui basic blue button{{end}} item" href="{{.Link}}?type=assigned&repo={{.RepoID}}&sort={{$.SortType}}&state={{.State}}"> |
14 | 14 | {{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}
|
15 | 15 | <strong class="ui right">{{.IssueStats.AssignCount}}</strong>
|
16 | 16 | </a>
|
17 |
| - <a class="{{if eq .ViewType "created_by"}}ui basic blue button{{end}} item" href="{{.Link}}?type=created_by&repo={{.RepoID}}&state={{.State}}"> |
| 17 | + <a class="{{if eq .ViewType "created_by"}}ui basic blue button{{end}} item" href="{{.Link}}?type=created_by&repo={{.RepoID}}&sort={{$.SortType}}&state={{.State}}"> |
18 | 18 | {{.i18n.Tr "repo.issues.filter_type.created_by_you"}}
|
19 | 19 | <strong class="ui right">{{.IssueStats.CreateCount}}</strong>
|
20 | 20 | </a>
|
21 | 21 | {{end}}
|
22 | 22 | <div class="ui divider"></div>
|
23 | 23 | {{range .Repos}}
|
24 |
| - <a class="{{if eq $.RepoID .ID}}ui basic blue button{{end}} repo name item" href="{{$.Link}}?type={{$.ViewType}}{{if not (eq $.RepoID .ID)}}&repo={{.ID}}{{end}}&state={{$.State}}"> |
| 24 | + <a class="{{if eq $.RepoID .ID}}ui basic blue button{{end}} repo name item" href="{{$.Link}}?type={{$.ViewType}}{{if not (eq $.RepoID .ID)}}&repo={{.ID}}{{end}}&sort={{$.SortType}}&state={{$.State}}"> |
25 | 25 | <span class="text truncate">{{$.ContextUser.Name}}/{{.Name}}</span>
|
26 | 26 | <div class="floating ui {{if $.IsShowClosed}}red{{else}}green{{end}} label">{{if $.IsShowClosed}}{{.NumClosedIssues}}{{else}}{{.NumOpenIssues}}{{end}}</div>
|
27 | 27 | </a>
|
|
30 | 30 | </div>
|
31 | 31 | <div class="twelve wide column content">
|
32 | 32 | <div class="ui tiny basic status buttons">
|
33 |
| - <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&state=open"> |
| 33 | + <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort={{$.SortType}}&state=open"> |
34 | 34 | <i class="octicon octicon-issue-opened"></i>
|
35 | 35 | {{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
|
36 | 36 | </a>
|
37 |
| - <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&state=closed"> |
| 37 | + <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort={{$.SortType}}&state=closed"> |
38 | 38 | <i class="octicon octicon-issue-closed"></i>
|
39 | 39 | {{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
|
40 | 40 | </a>
|
41 | 41 | </div>
|
| 42 | + <div class="ui right floated secondary filter menu"> |
| 43 | + <!-- Sort --> |
| 44 | + <div class="ui dropdown type jump item"> |
| 45 | + <span class="text"> |
| 46 | + {{.i18n.Tr "repo.issues.filter_sort"}} |
| 47 | + <i class="dropdown icon"></i> |
| 48 | + </span> |
| 49 | + <div class="menu"> |
| 50 | + <a class="{{if or (eq .SortType "latest") (not .SortType)}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=latest&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a> |
| 51 | + <a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=oldest&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a> |
| 52 | + <a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=recentupdate&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a> |
| 53 | + <a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=leastupdate&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a> |
| 54 | + <a class="{{if eq .SortType "mostcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=mostcomment&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.mostcomment"}}</a> |
| 55 | + <a class="{{if eq .SortType "leastcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=leastcomment&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.leastcomment"}}</a> |
| 56 | + </div> |
| 57 | + </div> |
| 58 | + </div> |
42 | 59 |
|
43 | 60 | <div class="issue list">
|
44 | 61 | {{range .Issues}}
|
|
0 commit comments