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.

184 lines
9.4 KiB

  1. {{template "base/head" .}}
  2. <div class="repository commits">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <h2 class="ui header">{{.DateFrom}} - {{.DateUntil}}
  6. <div class="ui right">
  7. <!-- Period -->
  8. <div class="ui floating dropdown jump filter">
  9. <div class="ui basic compact button">
  10. <span class="text">
  11. {{.i18n.Tr "repo.activity.period.filter_label"}} <strong>{{.PeriodText}}</strong>
  12. <i class="dropdown icon"></i>
  13. </span>
  14. </div>
  15. <div class="menu">
  16. <a class="{{if eq .Period "daily"}}active {{end}}item" href="{{$.RepoLink}}/activity/daily">{{.i18n.Tr "repo.activity.period.daily"}}</a>
  17. <a class="{{if eq .Period "halfweekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/halfweekly">{{.i18n.Tr "repo.activity.period.halfweekly"}}</a>
  18. <a class="{{if eq .Period "weekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/weekly">{{.i18n.Tr "repo.activity.period.weekly"}}</a>
  19. <a class="{{if eq .Period "monthly"}}active {{end}}item" href="{{$.RepoLink}}/activity/monthly">{{.i18n.Tr "repo.activity.period.monthly"}}</a>
  20. </div>
  21. </div>
  22. </div>
  23. </h2>
  24. <div class="ui divider"></div>
  25. {{if (or (.Repository.UnitEnabled $.UnitTypeIssues) (.Repository.UnitEnabled $.UnitTypePullRequests))}}
  26. <h4 class="ui top attached header">{{.i18n.Tr "repo.activity.overview"}}</h4>
  27. <div class="ui attached segment two column grid">
  28. {{if .Repository.UnitEnabled $.UnitTypePullRequests}}
  29. <div class="column">
  30. {{if gt .Activity.ActivePRCount 0}}
  31. <div class="stats-table">
  32. <a href="#merged-pull-requests" class="table-cell tiny background purple" style="width: {{.Activity.MergedPRPerc}}%"></a>
  33. <a href="#proposed-pull-requests" class="table-cell tiny background green"></a>
  34. </div>
  35. {{end}}
  36. {{.i18n.Tr (TrN .i18n.Lang .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n") .Activity.ActivePRCount | Safe }}
  37. </div>
  38. {{end}}
  39. {{if .Repository.UnitEnabled $.UnitTypeIssues}}
  40. <div class="column">
  41. {{if gt .Activity.ActiveIssueCount 0}}
  42. <div class="stats-table">
  43. <a href="#closed-issues" class="table-cell tiny background red" style="width: {{.Activity.ClosedIssuePerc}}%"></a>
  44. <a href="#new-issues" class="table-cell tiny background green"></a>
  45. </div>
  46. {{end}}
  47. {{.i18n.Tr (TrN .i18n.Lang .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n") .Activity.ActiveIssueCount | Safe }}
  48. </div>
  49. {{end}}
  50. </div>
  51. <div class="ui attached segment horizontal segments">
  52. {{if .Repository.UnitEnabled $.UnitTypePullRequests}}
  53. <a href="#merged-pull-requests" class="ui attached segment text center">
  54. <i class="text purple octicon octicon-git-pull-request"></i> <strong>{{.Activity.MergedPRCount}}</strong><br>
  55. {{.i18n.Tr (TrN .i18n.Lang .Activity.MergedPRCount "repo.activity.merged_prs_count_1" "repo.activity.merged_prs_count_n") }}
  56. </a>
  57. <a href="#proposed-pull-requests" class="ui attached segment text center">
  58. <i class="text green octicon octicon-git-branch"></i> <strong>{{.Activity.OpenedPRCount}}</strong><br>
  59. {{.i18n.Tr (TrN .i18n.Lang .Activity.OpenedPRCount "repo.activity.opened_prs_count_1" "repo.activity.opened_prs_count_n") }}
  60. </a>
  61. {{end}}
  62. {{if .Repository.UnitEnabled $.UnitTypeIssues}}
  63. <a href="#closed-issues" class="ui attached segment text center">
  64. <i class="text red octicon octicon-issue-closed"></i> <strong>{{.Activity.ClosedIssueCount}}</strong><br>
  65. {{.i18n.Tr (TrN .i18n.Lang .Activity.ClosedIssueCount "repo.activity.closed_issues_count_1" "repo.activity.closed_issues_count_n") }}
  66. </a>
  67. <a href="#new-issues" class="ui attached segment text center">
  68. <i class="text green octicon octicon-issue-opened"></i> <strong>{{.Activity.OpenedIssueCount}}</strong><br>
  69. {{.i18n.Tr (TrN .i18n.Lang .Activity.OpenedIssueCount "repo.activity.new_issues_count_1" "repo.activity.new_issues_count_n") }}
  70. </a>
  71. {{end}}
  72. </div>
  73. {{end}}
  74. {{if gt .Activity.PublishedReleaseCount 0}}
  75. <h4 class="ui horizontal divider header" id="published-releases">
  76. <i class="text octicon octicon-tag"></i>
  77. {{.i18n.Tr "repo.activity.title.releases_published_by" (.i18n.Tr (TrN .i18n.Lang .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n") .Activity.PublishedReleaseCount) (.i18n.Tr (TrN .i18n.Lang .Activity.PublishedReleaseAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n") .Activity.PublishedReleaseAuthorCount) }}
  78. </h4>
  79. <div class="list">
  80. {{range .Activity.PublishedReleases}}
  81. <p class="desc">
  82. <div class="ui green label">{{$.i18n.Tr "repo.activity.published_release_label"}}</div>
  83. {{.TagName}}
  84. {{if not .IsTag}}
  85. <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/src/{{.TagName}}">{{.Title}}</a>
  86. {{end}}
  87. {{TimeSinceUnix .CreatedUnix $.Lang}}
  88. </p>
  89. {{end}}
  90. </div>
  91. {{end}}
  92. {{if gt .Activity.MergedPRCount 0}}
  93. <h4 class="ui horizontal divider header" id="merged-pull-requests">
  94. <i class="text octicon octicon-git-pull-request"></i>
  95. {{.i18n.Tr "repo.activity.title.prs_merged_by" (.i18n.Tr (TrN .i18n.Lang .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n") .Activity.MergedPRCount) (.i18n.Tr (TrN .i18n.Lang .Activity.MergedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n") .Activity.MergedPRAuthorCount) }}
  96. </h4>
  97. <div class="list">
  98. {{range .Activity.MergedPRs}}
  99. <p class="desc">
  100. <div class="ui purple label">{{$.i18n.Tr "repo.activity.merged_prs_label"}}</div>
  101. #{{.Index}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/pulls/{{.Index}}">{{.Issue.Title}}</a>
  102. {{TimeSinceUnix .MergedUnix $.Lang}}
  103. </p>
  104. {{end}}
  105. </div>
  106. {{end}}
  107. {{if gt .Activity.OpenedPRCount 0}}
  108. <h4 class="ui horizontal divider header" id="proposed-pull-requests">
  109. <i class="text octicon octicon-git-branch"></i>
  110. {{.i18n.Tr "repo.activity.title.prs_opened_by" (.i18n.Tr (TrN .i18n.Lang .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n") .Activity.OpenedPRCount) (.i18n.Tr (TrN .i18n.Lang .Activity.OpenedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n") .Activity.OpenedPRAuthorCount) }}
  111. </h4>
  112. <div class="list">
  113. {{range .Activity.OpenedPRs}}
  114. <p class="desc">
  115. <div class="ui green label">{{$.i18n.Tr "repo.activity.opened_prs_label"}}</div>
  116. #{{.Index}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/pulls/{{.Index}}">{{.Issue.Title}}</a>
  117. {{TimeSinceUnix .Issue.CreatedUnix $.Lang}}
  118. </p>
  119. {{end}}
  120. </div>
  121. {{end}}
  122. {{if gt .Activity.ClosedIssueCount 0}}
  123. <h4 class="ui horizontal divider header" id="closed-issues">
  124. <i class="text octicon octicon-issue-closed"></i>
  125. {{.i18n.Tr "repo.activity.title.issues_closed_by" (.i18n.Tr (TrN .i18n.Lang .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n") .Activity.ClosedIssueCount) (.i18n.Tr (TrN .i18n.Lang .Activity.ClosedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n") .Activity.ClosedIssueAuthorCount) }}
  126. </h4>
  127. <div class="list">
  128. {{range .Activity.ClosedIssues}}
  129. <p class="desc">
  130. <div class="ui red label">{{$.i18n.Tr "repo.activity.closed_issue_label"}}</div>
  131. #{{.Index}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/issues/{{.Index}}">{{.Title}}</a>
  132. {{TimeSinceUnix .UpdatedUnix $.Lang}}
  133. </p>
  134. {{end}}
  135. </div>
  136. {{end}}
  137. {{if gt .Activity.OpenedIssueCount 0}}
  138. <h4 class="ui horizontal divider header" id="new-issues">
  139. <i class="text octicon octicon-issue-opened"></i>
  140. {{.i18n.Tr "repo.activity.title.issues_created_by" (.i18n.Tr (TrN .i18n.Lang .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n") .Activity.OpenedIssueCount) (.i18n.Tr (TrN .i18n.Lang .Activity.OpenedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n") .Activity.OpenedIssueAuthorCount) }}
  141. </h4>
  142. <div class="list">
  143. {{range .Activity.OpenedIssues}}
  144. <p class="desc">
  145. <div class="ui green label">{{$.i18n.Tr "repo.activity.new_issue_label"}}</div>
  146. #{{.Index}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/issues/{{.Index}}">{{.Title}}</a>
  147. {{TimeSinceUnix .CreatedUnix $.Lang}}
  148. </p>
  149. {{end}}
  150. </div>
  151. {{end}}
  152. {{if gt .Activity.UnresolvedIssueCount 0}}
  153. <h4 class="ui horizontal divider header" id="unresolved-conversations">
  154. <i class="text octicon octicon-comment-discussion"></i>
  155. {{.i18n.Tr (TrN .i18n.Lang .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n") .Activity.UnresolvedIssueCount }}
  156. </h4>
  157. <div class="text center desc">
  158. {{.i18n.Tr "repo.activity.unresolved_conv_desc"}}
  159. </div>
  160. <div class="list">
  161. {{range .Activity.UnresolvedIssues}}
  162. <p class="desc">
  163. <div class="ui green label">{{$.i18n.Tr "repo.activity.unresolved_conv_label"}}</div>
  164. #{{.Index}}
  165. {{if .IsPull}}
  166. <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/pulls/{{.Index}}">{{.Title}}</a>
  167. {{else}}
  168. <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/issues/{{.Index}}">{{.Title}}</a>
  169. {{end}}
  170. {{TimeSinceUnix .UpdatedUnix $.Lang}}
  171. </p>
  172. {{end}}
  173. </div>
  174. {{end}}
  175. </div>
  176. </div>
  177. {{template "base/footer" .}}