You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

issues.tmpl 7.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {{template "base/head" .}}
  2. <div role="main" aria-label="{{.Title}}" class="page-content dashboard issues">
  3. {{template "user/dashboard/navbar" .}}
  4. <div class="ui container">
  5. <div class="ui stackable grid">
  6. <div class="four wide column">
  7. <div class="ui secondary vertical filter menu">
  8. <a class="{{if eq .ViewType "your_repositories"}}ui basic primary button{{end}} item" href="{{.Link}}?type=your_repositories&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
  9. {{.locale.Tr "home.issues.in_your_repos"}}
  10. <strong class="ui right">{{CountFmt .IssueStats.YourRepositoriesCount}}</strong>
  11. </a>
  12. <a class="{{if eq .ViewType "assigned"}}ui basic primary button{{end}} item" href="{{.Link}}?type=assigned&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
  13. {{.locale.Tr "repo.issues.filter_type.assigned_to_you"}}
  14. <strong class="ui right">{{CountFmt .IssueStats.AssignCount}}</strong>
  15. </a>
  16. <a class="{{if eq .ViewType "created_by"}}ui basic primary button{{end}} item" href="{{.Link}}?type=created_by&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
  17. {{.locale.Tr "repo.issues.filter_type.created_by_you"}}
  18. <strong class="ui right">{{CountFmt .IssueStats.CreateCount}}</strong>
  19. </a>
  20. {{if .PageIsPulls}}
  21. <a class="{{if eq .ViewType "review_requested"}}ui basic primary button{{end}} item" href="{{.Link}}?type=review_requested&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
  22. {{.locale.Tr "repo.issues.filter_type.review_requested"}}
  23. <strong class="ui right">{{CountFmt .IssueStats.ReviewRequestedCount}}</strong>
  24. </a>
  25. <a class="{{if eq .ViewType "reviewed_by"}}ui basic primary button{{end}} item" href="{{.Link}}?type=reviewed_by&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
  26. {{.locale.Tr "repo.issues.filter_type.reviewed_by_you"}}
  27. <strong class="ui right">{{CountFmt .IssueStats.ReviewedCount}}</strong>
  28. </a>
  29. {{end}}
  30. <a class="{{if eq .ViewType "mentioned"}}ui basic primary button{{end}} item" href="{{.Link}}?type=mentioned&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
  31. {{.locale.Tr "repo.issues.filter_type.mentioning_you"}}
  32. <strong class="ui right">{{CountFmt .IssueStats.MentionCount}}</strong>
  33. </a>
  34. <div class="ui divider"></div>
  35. <a class="{{if not $.RepoIDs}}ui basic primary button{{end}} repo name item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&q={{$.Keyword}}">
  36. <span class="text truncate">All</span>
  37. <span>{{CountFmt .TotalIssueCount}}</span>
  38. </a>
  39. {{range .Repos}}
  40. {{with $Repo := .}}
  41. <a class="{{range $.RepoIDs}}{{if eq . $Repo.ID}}ui basic primary button{{end}}{{end}} repo name item" href="{{$.Link}}?type={{$.ViewType}}&repos=[
  42. {{- with $include := true -}}
  43. {{- range $.RepoIDs -}}
  44. {{- if eq . $Repo.ID -}}
  45. {{$include = false}}
  46. {{- else -}}
  47. {{.}}%2C
  48. {{- end -}}
  49. {{- end -}}
  50. {{- if eq $include true -}}
  51. {{$Repo.ID}}%2C
  52. {{- end -}}
  53. {{- end -}}
  54. ]&sort={{$.SortType}}&state={{$.State}}&q={{$.Keyword}}" title="{{.FullName}}">
  55. <span class="text truncate">{{$Repo.FullName}}</span>
  56. <span>{{CountFmt (index $.Counts $Repo.ID)}}</span>
  57. </a>
  58. {{end}}
  59. {{end}}
  60. </div>
  61. </div>
  62. <div class="twelve wide column content">
  63. <div class="ui three column stackable grid">
  64. <div class="column">
  65. <div class="ui compact tiny menu">
  66. <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}">
  67. {{svg "octicon-issue-opened" 16 "gt-mr-3"}}
  68. {{JsPrettyNumber .IssueStats.OpenCount}}&nbsp;{{.locale.Tr "repo.issues.open_title"}}
  69. </a>
  70. <a class="item{{if .IsShowClosed}} active{{end}}" href="{{.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=closed&q={{$.Keyword}}">
  71. {{svg "octicon-issue-closed" 16 "gt-mr-3"}}
  72. {{JsPrettyNumber .IssueStats.ClosedCount}}&nbsp;{{.locale.Tr "repo.issues.closed_title"}}
  73. </a>
  74. </div>
  75. </div>
  76. <div class="column center aligned">
  77. <form class="ui form ignore-dirty">
  78. <div class="ui search fluid action input">
  79. <input type="hidden" name="type" value="{{$.ViewType}}">
  80. <input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}}%2C{{end}}]">
  81. <input type="hidden" name="sort" value="{{$.SortType}}">
  82. <input type="hidden" name="state" value="{{$.State}}">
  83. <input name="q" value="{{$.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}...">
  84. <button class="ui primary button" type="submit">{{.locale.Tr "explore.search"}}</button>
  85. </div>
  86. </form>
  87. </div>
  88. <div class="column right aligned gt-df gt-ac gt-je">
  89. <!-- Sort -->
  90. <div class="ui dropdown type jump item">
  91. <span class="text gt-whitespace-nowrap">
  92. {{.locale.Tr "repo.issues.filter_sort"}}
  93. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  94. </span>
  95. <div class="menu">
  96. <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=recentupdate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
  97. <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastupdate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
  98. <a class="{{if or (eq .SortType "latest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=latest&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
  99. <a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=oldest&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
  100. <a class="{{if eq .SortType "mostcomment"}}active {{end}}item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostcomment&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.mostcomment"}}</a>
  101. <a class="{{if eq .SortType "leastcomment"}}active {{end}}item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastcomment&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.leastcomment"}}</a>
  102. <a class="{{if eq .SortType "nearduedate"}}active {{end}}item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=nearduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.nearduedate"}}</a>
  103. <a class="{{if eq .SortType "farduedate"}}active {{end}}item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=farduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.farduedate"}}</a>
  104. </div>
  105. </div>
  106. {{if .SingleRepoLink}}
  107. {{if eq .SingleRepoAction "issue"}}
  108. <a class="ui green button gt-ml-4" href="{{.SingleRepoLink}}/issues/new/choose">{{.locale.Tr "repo.issues.new"}}</a>
  109. {{else if eq .SingleRepoAction "pull"}}
  110. <a class="ui green button gt-ml-4" href="{{.SingleRepoLink}}/compare">{{.locale.Tr "repo.pulls.new"}}</a>
  111. {{end}}
  112. {{end}}
  113. </div>
  114. </div>
  115. {{template "shared/issuelist" mergeinto . "listType" "dashboard"}}
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. {{template "base/footer" .}}