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.

192 lines
9.7 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}}{{if ne .Activity.MergedPRPerc 0}}%{{end}}"></a>
  33. <a href="#proposed-pull-requests" class="table-cell tiny background green"></a>
  34. </div>
  35. {{else}}
  36. <div class="stats-table">
  37. <a class="table-cell tiny background light grey"></a>
  38. </div>
  39. {{end}}
  40. {{.i18n.Tr (TrN .i18n.Lang .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n") .Activity.ActivePRCount | Safe }}
  41. </div>
  42. {{end}}
  43. {{if .Repository.UnitEnabled $.UnitTypeIssues}}
  44. <div class="column">
  45. {{if gt .Activity.ActiveIssueCount 0}}
  46. <div class="stats-table">
  47. <a href="#closed-issues" class="table-cell tiny background red" style="width: {{.Activity.ClosedIssuePerc}}{{if ne .Activity.ClosedIssuePerc 0}}%{{end}}"></a>
  48. <a href="#new-issues" class="table-cell tiny background green"></a>
  49. </div>
  50. {{else}}
  51. <div class="stats-table">
  52. <a class="table-cell tiny background light grey"></a>
  53. </div>
  54. {{end}}
  55. {{.i18n.Tr (TrN .i18n.Lang .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n") .Activity.ActiveIssueCount | Safe }}
  56. </div>
  57. {{end}}
  58. </div>
  59. <div class="ui attached segment horizontal segments">
  60. {{if .Repository.UnitEnabled $.UnitTypePullRequests}}
  61. <a href="#merged-pull-requests" class="ui attached segment text center">
  62. <i class="text purple octicon octicon-git-pull-request"></i> <strong>{{.Activity.MergedPRCount}}</strong><br>
  63. {{.i18n.Tr (TrN .i18n.Lang .Activity.MergedPRCount "repo.activity.merged_prs_count_1" "repo.activity.merged_prs_count_n") }}
  64. </a>
  65. <a href="#proposed-pull-requests" class="ui attached segment text center">
  66. <i class="text green octicon octicon-git-branch"></i> <strong>{{.Activity.OpenedPRCount}}</strong><br>
  67. {{.i18n.Tr (TrN .i18n.Lang .Activity.OpenedPRCount "repo.activity.opened_prs_count_1" "repo.activity.opened_prs_count_n") }}
  68. </a>
  69. {{end}}
  70. {{if .Repository.UnitEnabled $.UnitTypeIssues}}
  71. <a href="#closed-issues" class="ui attached segment text center">
  72. <i class="text red octicon octicon-issue-closed"></i> <strong>{{.Activity.ClosedIssueCount}}</strong><br>
  73. {{.i18n.Tr (TrN .i18n.Lang .Activity.ClosedIssueCount "repo.activity.closed_issues_count_1" "repo.activity.closed_issues_count_n") }}
  74. </a>
  75. <a href="#new-issues" class="ui attached segment text center">
  76. <i class="text green octicon octicon-issue-opened"></i> <strong>{{.Activity.OpenedIssueCount}}</strong><br>
  77. {{.i18n.Tr (TrN .i18n.Lang .Activity.OpenedIssueCount "repo.activity.new_issues_count_1" "repo.activity.new_issues_count_n") }}
  78. </a>
  79. {{end}}
  80. </div>
  81. {{end}}
  82. {{if gt .Activity.PublishedReleaseCount 0}}
  83. <h4 class="ui horizontal divider header" id="published-releases">
  84. <i class="text octicon octicon-tag"></i>
  85. {{.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) }}
  86. </h4>
  87. <div class="list">
  88. {{range .Activity.PublishedReleases}}
  89. <p class="desc">
  90. <div class="ui green label">{{$.i18n.Tr "repo.activity.published_release_label"}}</div>
  91. {{.TagName}}
  92. {{if not .IsTag}}
  93. <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/src/{{.TagName}}">{{.Title}}</a>
  94. {{end}}
  95. {{TimeSinceUnix .CreatedUnix $.Lang}}
  96. </p>
  97. {{end}}
  98. </div>
  99. {{end}}
  100. {{if gt .Activity.MergedPRCount 0}}
  101. <h4 class="ui horizontal divider header" id="merged-pull-requests">
  102. <i class="text octicon octicon-git-pull-request"></i>
  103. {{.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) }}
  104. </h4>
  105. <div class="list">
  106. {{range .Activity.MergedPRs}}
  107. <p class="desc">
  108. <div class="ui purple label">{{$.i18n.Tr "repo.activity.merged_prs_label"}}</div>
  109. #{{.Index}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/pulls/{{.Index}}">{{.Issue.Title}}</a>
  110. {{TimeSinceUnix .MergedUnix $.Lang}}
  111. </p>
  112. {{end}}
  113. </div>
  114. {{end}}
  115. {{if gt .Activity.OpenedPRCount 0}}
  116. <h4 class="ui horizontal divider header" id="proposed-pull-requests">
  117. <i class="text octicon octicon-git-branch"></i>
  118. {{.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) }}
  119. </h4>
  120. <div class="list">
  121. {{range .Activity.OpenedPRs}}
  122. <p class="desc">
  123. <div class="ui green label">{{$.i18n.Tr "repo.activity.opened_prs_label"}}</div>
  124. #{{.Index}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/pulls/{{.Index}}">{{.Issue.Title}}</a>
  125. {{TimeSinceUnix .Issue.CreatedUnix $.Lang}}
  126. </p>
  127. {{end}}
  128. </div>
  129. {{end}}
  130. {{if gt .Activity.ClosedIssueCount 0}}
  131. <h4 class="ui horizontal divider header" id="closed-issues">
  132. <i class="text octicon octicon-issue-closed"></i>
  133. {{.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) }}
  134. </h4>
  135. <div class="list">
  136. {{range .Activity.ClosedIssues}}
  137. <p class="desc">
  138. <div class="ui red label">{{$.i18n.Tr "repo.activity.closed_issue_label"}}</div>
  139. #{{.Index}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/issues/{{.Index}}">{{.Title}}</a>
  140. {{TimeSinceUnix .ClosedUnix $.Lang}}
  141. </p>
  142. {{end}}
  143. </div>
  144. {{end}}
  145. {{if gt .Activity.OpenedIssueCount 0}}
  146. <h4 class="ui horizontal divider header" id="new-issues">
  147. <i class="text octicon octicon-issue-opened"></i>
  148. {{.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) }}
  149. </h4>
  150. <div class="list">
  151. {{range .Activity.OpenedIssues}}
  152. <p class="desc">
  153. <div class="ui green label">{{$.i18n.Tr "repo.activity.new_issue_label"}}</div>
  154. #{{.Index}} <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/issues/{{.Index}}">{{.Title}}</a>
  155. {{TimeSinceUnix .CreatedUnix $.Lang}}
  156. </p>
  157. {{end}}
  158. </div>
  159. {{end}}
  160. {{if gt .Activity.UnresolvedIssueCount 0}}
  161. <h4 class="ui horizontal divider header" id="unresolved-conversations">
  162. <i class="text octicon octicon-comment-discussion"></i>
  163. {{.i18n.Tr (TrN .i18n.Lang .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n") .Activity.UnresolvedIssueCount }}
  164. </h4>
  165. <div class="text center desc">
  166. {{.i18n.Tr "repo.activity.unresolved_conv_desc"}}
  167. </div>
  168. <div class="list">
  169. {{range .Activity.UnresolvedIssues}}
  170. <p class="desc">
  171. <div class="ui green label">{{$.i18n.Tr "repo.activity.unresolved_conv_label"}}</div>
  172. #{{.Index}}
  173. {{if .IsPull}}
  174. <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/pulls/{{.Index}}">{{.Title}}</a>
  175. {{else}}
  176. <a class="title has-emoji" href="{{$.Repository.HTMLURL}}/issues/{{.Index}}">{{.Title}}</a>
  177. {{end}}
  178. {{TimeSinceUnix .UpdatedUnix $.Lang}}
  179. </p>
  180. {{end}}
  181. </div>
  182. {{end}}
  183. </div>
  184. </div>
  185. {{template "base/footer" .}}