本站源代码
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

140 Zeilen
8.0KB

  1. {{template "base/head" .}}
  2. <div class="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 blue button{{end}} item" href="{{.Link}}?type=your_repositories&repo={{.RepoID}}&sort={{$.SortType}}&state={{.State}}">
  9. {{.i18n.Tr "home.issues.in_your_repos"}}
  10. <strong class="ui right">{{.IssueStats.YourRepositoriesCount}}</strong>
  11. </a>
  12. {{if not .ContextUser.IsOrganization}}
  13. <a class="{{if eq .ViewType "assigned"}}ui basic blue button{{end}} item" href="{{.Link}}?type=assigned&repo={{.RepoID}}&sort={{$.SortType}}&state={{.State}}">
  14. {{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}
  15. <strong class="ui right">{{.IssueStats.AssignCount}}</strong>
  16. </a>
  17. <a class="{{if eq .ViewType "created_by"}}ui basic blue button{{end}} item" href="{{.Link}}?type=created_by&repo={{.RepoID}}&sort={{$.SortType}}&state={{.State}}">
  18. {{.i18n.Tr "repo.issues.filter_type.created_by_you"}}
  19. <strong class="ui right">{{.IssueStats.CreateCount}}</strong>
  20. </a>
  21. <a class="{{if eq .ViewType "mentioned"}}ui basic blue button{{end}} item" href="{{.Link}}?type=mentioned&repo={{.RepoID}}&sort={{$.SortType}}&state={{.State}}">
  22. {{.i18n.Tr "repo.issues.filter_type.mentioning_you"}}
  23. <strong class="ui right">{{.IssueStats.MentionCount}}</strong>
  24. </a>
  25. {{end}}
  26. <div class="ui divider"></div>
  27. {{range .Repos}}
  28. <a class="{{if eq $.RepoID .ID}}ui basic blue button{{end}} repo name item" href="{{$.Link}}?type={{$.ViewType}}{{if not (eq $.RepoID .ID)}}&repo={{.ID}}{{end}}&sort={{$.SortType}}&state={{$.State}}" title="{{.FullName}}">
  29. <span class="text truncate">{{.FullName}}</span>
  30. <div class="floating ui {{if $.IsShowClosed}}red{{else}}green{{end}} label">{{index $.Counts .ID}}</div>
  31. </a>
  32. {{end}}
  33. </div>
  34. </div>
  35. <div class="twelve wide column content">
  36. <div class="ui tiny basic status buttons">
  37. <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort={{$.SortType}}&state=open">
  38. <i class="octicon octicon-issue-opened"></i>
  39. {{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
  40. </a>
  41. <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort={{$.SortType}}&state=closed">
  42. <i class="octicon octicon-issue-closed"></i>
  43. {{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
  44. </a>
  45. </div>
  46. <div class="ui right floated secondary filter menu">
  47. <!-- Sort -->
  48. <div class="ui dropdown type jump item">
  49. <span class="text">
  50. {{.i18n.Tr "repo.issues.filter_sort"}}
  51. <i class="dropdown icon"></i>
  52. </span>
  53. <div class="menu">
  54. <a class="{{if or (eq .SortType "latest") (not .SortType)}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=latest&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
  55. <a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=oldest&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
  56. <a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=recentupdate&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
  57. <a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=leastupdate&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
  58. <a class="{{if eq .SortType "mostcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=mostcomment&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.mostcomment"}}</a>
  59. <a class="{{if eq .SortType "leastcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=leastcomment&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.leastcomment"}}</a>
  60. <a class="{{if eq .SortType "nearduedate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=nearduedate&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.nearduedate"}}</a>
  61. <a class="{{if eq .SortType "farduedate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repo={{.RepoID}}&sort=farduedate&state={{$.State}}">{{.i18n.Tr "repo.issues.filter_sort.farduedate"}}</a>
  62. </div>
  63. </div>
  64. </div>
  65. <div class="issue list">
  66. {{range .Issues}}
  67. {{ $timeStr:= TimeSinceUnix .CreatedUnix $.Lang }}
  68. <li class="item">
  69. <div class="ui label">{{if not $.RepoID}}{{.Repo.FullName}}{{end}}#{{.Index}}</div>
  70. <a class="title has-emoji" href="{{AppSubUrl}}/{{.Repo.Owner.Name}}/{{.Repo.Name}}/issues/{{.Index}}">{{.Title}}</a>
  71. {{if .IsPull }}
  72. {{if (index $.CommitStatus .PullRequest.ID)}}
  73. {{template "repo/commit_status" (index $.CommitStatus .PullRequest.ID)}}
  74. {{end}}
  75. {{end}}
  76. {{with .Labels}}
  77. {{/* If we have any labels, we should show them
  78. with a 2.5 line height, this way they don't look
  79. awful and they don't stack on top of each other,
  80. especially on mobile views. */}}
  81. <span style="line-height: 2.5">
  82. {{range .}}
  83. <a class="ui label has-emoji" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&repo={{$.RepoID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name}}</a>
  84. {{end}}
  85. </span>
  86. {{end}}
  87. {{if .NumComments}}
  88. <span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span>
  89. {{end}}
  90. {{if .TotalTrackedTime}}
  91. <span class="comment ui right"><i class="octicon octicon-clock"></i> {{.TotalTrackedTime | Sec2Time}}</span>
  92. {{end}}
  93. <p class="desc">
  94. {{if .OriginalAuthor}}
  95. {{$.i18n.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor | Safe}}
  96. {{else if gt .Poster.ID 0}}
  97. {{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink (.Poster.GetDisplayName|Escape) | Safe}}
  98. {{else}}
  99. {{$.i18n.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName|Escape) | Safe}}
  100. {{end}}
  101. {{if .Milestone}}
  102. <a class="milestone" href="{{AppSubUrl}}/{{.Repo.Owner.Name}}/{{.Repo.Name}}{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}&assignee={{$.AssigneeID}}">
  103. <span class="octicon octicon-milestone"></span> {{.Milestone.Name}}
  104. </a>
  105. {{end}}
  106. {{if .Ref}}
  107. <a class="ref" href="{{AppSubUrl}}/{{.Repo.Owner.Name}}/{{.Repo.Name}}/src/branch/{{.Ref}}">
  108. <span class="octicon octicon-git-branch"></span> {{.Ref}}
  109. </a>
  110. {{end}}
  111. {{range .Assignees}}
  112. <a class="ui right assignee poping up" href="{{.HomeLink}}" data-content="{{.GetDisplayName}}" data-variation="inverted" data-position="left center">
  113. <img class="ui avatar image" src="{{.RelAvatarLink}}">
  114. </a>
  115. {{end}}
  116. {{$tasks := .GetTasks}}
  117. {{if gt $tasks 0}}
  118. {{$tasksDone := .GetTasksDone}}
  119. <span class="checklist">
  120. <span class="octicon octicon-checklist"></span> {{$tasksDone}} / {{$tasks}} <span class="progress-bar"><span class="progress" style="width:calc(100% * {{$tasksDone}} / {{$tasks}});"></span></span>
  121. </span>
  122. {{end}}
  123. </p>
  124. </li>
  125. {{end}}
  126. {{template "base/paginate" .}}
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. {{template "base/footer" .}}
上海开阖软件有限公司 沪ICP备12045867号-1