issues.tmpl 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. <div id="body-nav">
  4. <div class="container">
  5. <ul class="nav nav-pills pull-right">
  6. <li><a href="{{AppSubUrl}}/">News Feed</a></li>
  7. <li class="active"><a href="{{AppSubUrl}}/issues">Issues</a></li>
  8. <!-- <li><a href="{{AppSubUrl}}/pulls">Pull Requests</a></li>
  9. <li><a href="{{AppSubUrl}}/stars">Stars</a></li> -->
  10. </ul>
  11. <h3>Your Issues</h3>
  12. </div>
  13. </div>
  14. <div id="body" class="container" data-page="user">
  15. {{if .HasInfo}}<div class="alert alert-info">{{.InfoMsg}}</div>{{end}}
  16. <div id="issue">
  17. <div class="col-md-3 filter-list">
  18. <ul class="list-unstyled">
  19. <li><a href="{{AppSubUrl}}/issues?state={{.State}}&repoid={{.RepoId}}"{{if eq .ViewType "all"}} class="active"{{end}}>In your repositories <strong class="pull-right">{{.IssueStats.AllCount}}</strong></a></li>
  20. <li><a href="{{AppSubUrl}}/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>
  21. <li><a href="{{AppSubUrl}}/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>
  22. <li><hr/></li>
  23. {{range .Repos}}
  24. <li><a href="{{AppSubUrl}}/issues?type={{$.ViewType}}{{if eq $.RepoId .Id}}{{else}}&repoid={{.Id}}{{end}}&state={{$.State}}" class="sm{{if eq $.RepoId .Id}} active{{end}}">{{$.SignedUser.Name}}/{{.Name}} <strong class="pull-right">{{if $.IsShowClosed}}{{.NumClosedIssues}}{{else}}{{.NumOpenIssues}}{{end}}</strong></a></li>
  25. {{end}}
  26. </ul>
  27. </div>
  28. <div class="col-md-9">
  29. <div class="filter-option">
  30. <div class="btn-group">
  31. <a class="btn btn-default issue-open{{if not .IsShowClosed}} active{{end}}" href="{{AppSubUrl}}/issues?type={{.ViewType}}&repoid={{.RepoId}}">Open</a>
  32. <a class="btn btn-default issue-close{{if .IsShowClosed}} active{{end}}" href="{{AppSubUrl}}/issues?type={{.ViewType}}&repoid={{.RepoId}}&state=closed">Closed</a>
  33. </div>
  34. </div>
  35. <div class="issues list-group">
  36. {{range .Issues}}{{if .}}
  37. <div class="list-group-item issue-item" id="issue-{{.Id}}">
  38. <span class="number pull-right">#{{.Index}}</span>
  39. <h5 class="title"><a href="{{AppSubUrl}}/{{.Repo.Owner.Name}}/{{.Repo.Name}}/issues/{{.Index}}">{{.Name}}</a></h5>
  40. <p class="info">
  41. <span class="author"><img class="avatar" src="{{.Poster.AvatarLink}}" alt="" width="20"/>
  42. <a href="{{AppSubUrl}}/user/{{.Poster.Name}}">{{.Poster.Name}}</a></span>
  43. <span class="time">{{TimeSince .Created $.Lang}}</span>
  44. <span class="comment"><i class="fa fa-comments"></i> {{.NumComments}}</span>
  45. </p>
  46. </div>
  47. {{end}}{{end}}
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. {{template "base/footer" .}}