diff options
Diffstat (limited to 'templates/issue')
-rw-r--r-- | templates/issue/list.tmpl | 16 | ||||
-rw-r--r-- | templates/issue/user.tmpl | 10 |
2 files changed, 13 insertions, 13 deletions
diff --git a/templates/issue/list.tmpl b/templates/issue/list.tmpl index de25b0e3..0b995f81 100644 --- a/templates/issue/list.tmpl +++ b/templates/issue/list.tmpl @@ -6,21 +6,21 @@ <div id="issue"> <div class="col-md-3 filter-list"> <ul class="list-unstyled"> - <li><a href="{{.RepoLink}}/issues"{{if eq .ViewType "all"}} class="active"{{end}}>All Issues <strong class="pull-right">{{.IssueCount}}</strong></a></li> - <!-- <li><a href="#">Assigned to you</a></li> --> - <li><a href="{{.RepoLink}}/issues?type=created_by"{{if eq .ViewType "created_by"}} class="active"{{end}}>Created by you <strong class="pull-right">{{.IssueCreatedCount}}</strong></a></li> - <!-- <li><a href="#">Mentioned</a></li> --> + <li><a href="{{.RepoLink}}/issues?state={{.State}}"{{if eq .ViewType "all"}} class="active"{{end}}>All Issues <strong class="pull-right">{{..IssueStats.AllCount}}</strong></a></li> + <li><a href="{{.RepoLink}}/issues?type=assigned&state={{.State}}"{{if eq .ViewType "assigned"}} class="active"{{end}}>Assigned to you <strong class="pull-right">{{.IssueStats.AssignCount}}</strong></a></li> + <li><a href="{{.RepoLink}}/issues?type=created_by&state={{.State}}"{{if eq .ViewType "created_by"}} class="active"{{end}}>Created by you <strong class="pull-right">{{.IssueStats.CreateCount}}</strong></a></li> + <li><a href="{{.RepoLink}}/issues?type=mentioned&state={{.State}}"{{if eq .ViewType "mentioned"}} class="active"{{end}}>Mentioning you <strong class="pull-right">{{.IssueStats.MentionCount}}</strong></a></li> </ul> </div> <div class="col-md-9"> <div class="filter-option"> <div class="btn-group"> - <a class="btn btn-default issue-open{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/issues?type={{.ViewType}}">{{.OpenCount}} Open</a> - <a class="btn btn-default issue-close{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/issues?state=closed&type={{.ViewType}}">{{.ClosedCount}} Closed</a> + <a class="btn btn-default issue-open{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/issues?type={{.ViewType}}">{{..IssueStats.OpenCount}} Open</a> + <a class="btn btn-default issue-close{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/issues?type={{.ViewType}}&state=closed">{{.IssueStats.ClosedCount}} Closed</a> </div> </div> <div class="issues list-group"> - {{range .Issues}} + {{range .Issues}}{{if .Poster}} <div class="list-group-item issue-item" id="issue-{{.Id}}"> <span class="number pull-right">#{{.Index}}</span> <h5 class="title"><a href="{{$.RepoLink}}/issues/{{.Index}}">{{.Name}}</a></h5> @@ -31,7 +31,7 @@ <span class="comment"><i class="fa fa-comments"></i> {{.NumComments}}</span> </p> </div> - {{end}} + {{end}}{{end}} </div> </div> </div> diff --git a/templates/issue/user.tmpl b/templates/issue/user.tmpl index 812d9d8e..e1711d44 100644 --- a/templates/issue/user.tmpl +++ b/templates/issue/user.tmpl @@ -16,9 +16,9 @@ <div id="issue"> <div class="col-md-3 filter-list"> <ul class="list-unstyled"> - <li><a href="/issues"{{if eq .ViewType "all"}} class="active"{{end}}>In your repositories <strong class="pull-right">{{.AllIssueCount}}</strong></a></li> - <!-- <li><a href="#">Assigned to you</a></li> --> - <li><a href="/issues?type=created_by"{{if eq .ViewType "created_by"}} class="active"{{end}}>Created by you <strong class="pull-right">{{.CreatedByCount}}</strong></a></li> + <li><a href="/issues?state={{.State}}&repoid={{.RepoId}}"{{if eq .ViewType "all"}} class="active"{{end}}>In your repositories <strong class="pull-right">{{.IssueStats.AllCount}}</strong></a></li> + <li><a href="/issues?type=assigned&repoid={{.RepoId}}&state={{.State}}"{{if eq .ViewType "assigned"}} class="active"{{end}}>Assigned to you <strong class="pull-right">{{.IssueStats.AssignCount}}</strong></a></li> + <li><a href="/issues?type=created_by&repoid={{.RepoId}}&state={{.State}}"{{if eq .ViewType "created_by"}} class="active"{{end}}>Created by you <strong class="pull-right">{{.IssueStats.CreateCount}}</strong></a></li> <li><hr/></li> {{range .Repos}} <li><a href="/issues?type={{$.ViewType}}{{if eq $.RepoId .Id}}{{else}}&repoid={{.Id}}{{end}}" class="sm{{if eq $.RepoId .Id}} active{{end}}">{{$.SignedUser.Name}}/{{.Name}} <strong class="pull-right">{{.NumOpenIssues}}</strong></a></li> @@ -28,8 +28,8 @@ <div class="col-md-9"> <div class="filter-option"> <div class="btn-group"> - <a class="btn btn-default issue-open{{if not .IsShowClosed}} active{{end}}" href="/issues?type={{.ViewType}}&repoid={{.RepoId}}">{{.OpenIssueCount}} Open</a> - <a class="btn btn-default issue-close{{if .IsShowClosed}} active{{end}}" href="/issues?state=closed&type={{.ViewType}}&repoid={{.RepoId}}">{{.ClosedIssueCount}} Closed</a> + <a class="btn btn-default issue-open{{if not .IsShowClosed}} active{{end}}" href="/issues?type={{.ViewType}}">{{..IssueStats.OpenCount}} Open</a> + <a class="btn btn-default issue-close{{if .IsShowClosed}} active{{end}}" href="/issues?type={{.ViewType}}&state=closed">{{.IssueStats.ClosedCount}} Closed</a> </div> </div> <div class="issues list-group"> |