list.tmpl 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. {{template "repo/nav" .}}
  4. {{template "repo/toolbar" .}}
  5. <div id="body" class="container">
  6. <div id="issue">
  7. <div class="col-md-3 filters">
  8. <div class="filter-list">
  9. <ul class="list-unstyled">
  10. <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>
  11. <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>
  12. <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>
  13. <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>
  14. </ul>
  15. </div>
  16. <div class="label-filter">
  17. <h4>Label</h4>
  18. <ul class="list-unstyled">
  19. {{range .Labels}}
  20. <li><a href="#"><span class="pull-right count">{{if $.IsShowClosed}}{{.NumClosedIssues}}{{else}}{{.NumOpenIssues}}{{end}}</span><span class="color" style="background-color: {{.Color}}"></span>{{.Name}}</a></li>
  21. {{end}}
  22. </ul>
  23. <button class="btn btn-default btn-block label-button">Manage Labels</button>
  24. <hr/>
  25. <form id="label-add-form" action="{{$.RepoLink}}/issues/labels/new" method="post">
  26. {{.CsrfTokenHtml}}
  27. <h5><strong>New Label</strong></h5>
  28. <div class="input-group label-color-picker form-group">
  29. <input type="text" class="form-control" name="title" required="required" id="label-name-ipt"/>
  30. <input type="hidden" name="color" id="label-color-ipt"/>
  31. <span class="input-group-addon"><i></i></span>
  32. </div>
  33. <div class="form-group text-right">
  34. <button class="btn btn-default btn-sm">Create</button>
  35. </div>
  36. </form>
  37. </div>
  38. </div>
  39. <div class="col-md-9">
  40. {{template "base/alert" .}}
  41. <div class="filter-option">
  42. <div class="btn-group">
  43. <a class="btn btn-default issue-open{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/issues?type={{.ViewType}}">{{..IssueStats.OpenCount}} Open</a>
  44. <a class="btn btn-default issue-close{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/issues?type={{.ViewType}}&state=closed">{{.IssueStats.ClosedCount}} Closed</a>
  45. </div>
  46. </div>
  47. <div class="issues list-group">
  48. {{range .Issues}}{{if .Poster}}
  49. <div class="list-group-item issue-item{{if not .IsRead}} unread{{end}}" id="issue-{{.Id}}">
  50. <span class="number pull-right">#{{.Index}}</span>
  51. <h5 class="title"><a href="{{$.RepoLink}}/issues/{{.Index}}">{{.Name}}</a></h5>
  52. <p class="info">
  53. <span class="author"><img class="avatar" src="{{.Poster.AvatarLink}}" alt="" width="20"/>
  54. <a href="/user/{{.Poster.Name}}">{{.Poster.Name}}</a></span>
  55. <span class="time">{{TimeSince .Created}}</span>
  56. <span class="comment"><i class="fa fa-comments"></i> {{.NumComments}}</span>
  57. </p>
  58. </div>
  59. {{end}}{{end}}
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <script src="/js/bootstrap-colorpicker.min.js"></script>
  66. <script>
  67. $(function(){
  68. $('.label-color-picker').colorpicker({
  69. input:$('#label-color-ipt')
  70. });
  71. });
  72. </script>
  73. {{template "base/footer" .}}