diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-07 12:09:30 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-07 12:09:30 -0400 |
commit | 7407f9caf3e0baf3f9b7894fab021356662eed17 (patch) | |
tree | f8a06f17b900657e4088973e31b24ba93125190e /templates | |
parent | 8ca14e210959b9316a4eed6e127de1eb775fda74 (diff) | |
download | gitea-7407f9caf3e0baf3f9b7894fab021356662eed17.tar.gz gitea-7407f9caf3e0baf3f9b7894fab021356662eed17.zip |
Finish issue design
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/repos.tmpl | 2 | ||||
-rw-r--r-- | templates/issue/list.tmpl | 16 | ||||
-rw-r--r-- | templates/issue/user.tmpl | 10 |
3 files changed, 15 insertions, 13 deletions
diff --git a/templates/admin/repos.tmpl b/templates/admin/repos.tmpl index 3c0f5e09f7..2c5e3d3b7d 100644 --- a/templates/admin/repos.tmpl +++ b/templates/admin/repos.tmpl @@ -17,6 +17,7 @@ <th>Name</th> <th>Private</th> <th>Watches</th> + <th>Issues</th> <th>Forks</th> <th>Created</th> </tr> @@ -29,6 +30,7 @@ <td><a href="/{{.UserName}}/{{.Name}}">{{.Name}}</a></td> <td><i class="fa fa{{if .IsPrivate}}-check{{end}}-square-o"></i></td> <td>{{.NumWatches}}</td> + <td>{{.NumIssues}}</td> <td>{{.NumForks}}</td> <td>{{DateFormat .Created "M d, Y"}}</td> </tr> diff --git a/templates/issue/list.tmpl b/templates/issue/list.tmpl index de25b0e37f..0b995f810c 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 812d9d8e24..e1711d4476 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"> |