code.gitea.io/gitea@v1.22.3/templates/repo/pulse.tmpl (about) 1 <h2 class="ui header activity-header"> 2 <span>{{DateTime "long" .DateFrom}} - {{DateTime "long" .DateUntil}}</span> 3 <!-- Period --> 4 <div class="ui floating dropdown jump filter"> 5 <div class="ui basic compact button"> 6 {{ctx.Locale.Tr "repo.activity.period.filter_label"}} <strong>{{.PeriodText}}</strong> 7 {{svg "octicon-triangle-down" 14 "dropdown icon"}} 8 </div> 9 <div class="menu"> 10 <a class="{{if eq .Period "daily"}}active {{end}}item" href="{{$.RepoLink}}/activity/daily">{{ctx.Locale.Tr "repo.activity.period.daily"}}</a> 11 <a class="{{if eq .Period "halfweekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/halfweekly">{{ctx.Locale.Tr "repo.activity.period.halfweekly"}}</a> 12 <a class="{{if eq .Period "weekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/weekly">{{ctx.Locale.Tr "repo.activity.period.weekly"}}</a> 13 <a class="{{if eq .Period "monthly"}}active {{end}}item" href="{{$.RepoLink}}/activity/monthly">{{ctx.Locale.Tr "repo.activity.period.monthly"}}</a> 14 <a class="{{if eq .Period "quarterly"}}active {{end}}item" href="{{$.RepoLink}}/activity/quarterly">{{ctx.Locale.Tr "repo.activity.period.quarterly"}}</a> 15 <a class="{{if eq .Period "semiyearly"}}active {{end}}item" href="{{$.RepoLink}}/activity/semiyearly">{{ctx.Locale.Tr "repo.activity.period.semiyearly"}}</a> 16 <a class="{{if eq .Period "yearly"}}active {{end}}item" href="{{$.RepoLink}}/activity/yearly">{{ctx.Locale.Tr "repo.activity.period.yearly"}}</a> 17 </div> 18 </div> 19 </h2> 20 21 {{if (or (.Permission.CanRead ctx.Consts.RepoUnitTypeIssues) (.Permission.CanRead ctx.Consts.RepoUnitTypePullRequests))}} 22 <h4 class="ui top attached header">{{ctx.Locale.Tr "repo.activity.overview"}}</h4> 23 <div class="ui attached segment two column grid"> 24 {{if .Permission.CanRead ctx.Consts.RepoUnitTypePullRequests}} 25 <div class="column"> 26 {{if gt .Activity.ActivePRCount 0}} 27 <div class="stats-table"> 28 {{if gt .Activity.MergedPRPerc 0}} 29 <a href="#merged-pull-requests" class="table-cell tiny tw-bg-purple" style="width: {{.Activity.MergedPRPerc}}%"></a> 30 {{end}} 31 <a href="#proposed-pull-requests" class="table-cell tiny tw-bg-green"></a> 32 </div> 33 {{else}} 34 <div class="stats-table"> 35 <a class="table-cell tiny tw-bg-grey"></a> 36 </div> 37 {{end}} 38 {{ctx.Locale.TrN .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n" .Activity.ActivePRCount}} 39 </div> 40 {{end}} 41 {{if .Permission.CanRead ctx.Consts.RepoUnitTypeIssues}} 42 <div class="column"> 43 {{if gt .Activity.ActiveIssueCount 0}} 44 <div class="stats-table"> 45 {{if gt .Activity.ClosedIssuePerc 0}} 46 <a href="#closed-issues" class="table-cell tiny tw-bg-red" style="width: {{.Activity.ClosedIssuePerc}}%"></a> 47 {{end}} 48 <a href="#new-issues" class="table-cell tiny tw-bg-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 {{ctx.Locale.TrN .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n" .Activity.ActiveIssueCount}} 56 </div> 57 {{end}} 58 </div> 59 <div class="ui attached segment horizontal segments"> 60 {{if .Permission.CanRead ctx.Consts.RepoUnitTypePullRequests}} 61 <a href="#merged-pull-requests" class="ui attached segment text center"> 62 <span class="text purple">{{svg "octicon-git-pull-request"}}</span> <strong>{{.Activity.MergedPRCount}}</strong><br> 63 {{ctx.Locale.TrN .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 <span class="text green">{{svg "octicon-git-branch"}}</span> <strong>{{.Activity.OpenedPRCount}}</strong><br> 67 {{ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.opened_prs_count_1" "repo.activity.opened_prs_count_n"}} 68 </a> 69 {{end}} 70 {{if .Permission.CanRead ctx.Consts.RepoUnitTypeIssues}} 71 <a href="#closed-issues" class="ui attached segment text center"> 72 <span class="text red">{{svg "octicon-issue-closed"}}</span> <strong>{{.Activity.ClosedIssueCount}}</strong><br> 73 {{ctx.Locale.TrN .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 <span class="text green">{{svg "octicon-issue-opened"}}</span> <strong>{{.Activity.OpenedIssueCount}}</strong><br> 77 {{ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.new_issues_count_1" "repo.activity.new_issues_count_n"}} 78 </a> 79 {{end}} 80 </div> 81 {{end}} 82 83 {{if .Permission.CanRead ctx.Consts.RepoUnitTypeCode}} 84 {{if eq .Activity.Code.CommitCountInAllBranches 0}} 85 <div class="ui center aligned segment"> 86 <h4 class="ui header">{{ctx.Locale.Tr "repo.activity.no_git_activity"}}</h4> 87 </div> 88 {{end}} 89 {{if gt .Activity.Code.CommitCountInAllBranches 0}} 90 <div class="ui attached segment horizontal segments"> 91 <div class="ui attached segment text"> 92 {{ctx.Locale.Tr "repo.activity.git_stats_exclude_merges"}} 93 <strong>{{ctx.Locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_author_1" "repo.activity.git_stats_author_n" .Activity.Code.AuthorCount}}</strong> 94 {{ctx.Locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_pushed_1" "repo.activity.git_stats_pushed_n"}} 95 <strong>{{ctx.Locale.TrN .Activity.Code.CommitCount "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCount}}</strong> 96 {{ctx.Locale.Tr "repo.activity.git_stats_push_to_branch" .Repository.DefaultBranch}} 97 <strong>{{ctx.Locale.TrN .Activity.Code.CommitCountInAllBranches "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCountInAllBranches}}</strong> 98 {{ctx.Locale.Tr "repo.activity.git_stats_push_to_all_branches"}} 99 {{ctx.Locale.Tr "repo.activity.git_stats_on_default_branch" .Repository.DefaultBranch}} 100 <strong>{{ctx.Locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_file_1" "repo.activity.git_stats_file_n" .Activity.Code.ChangedFiles}}</strong> 101 {{ctx.Locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_files_changed_1" "repo.activity.git_stats_files_changed_n"}} 102 {{ctx.Locale.Tr "repo.activity.git_stats_additions"}} 103 <strong class="text green">{{ctx.Locale.TrN .Activity.Code.Additions "repo.activity.git_stats_addition_1" "repo.activity.git_stats_addition_n" .Activity.Code.Additions}}</strong> 104 {{ctx.Locale.Tr "repo.activity.git_stats_and_deletions"}} 105 <strong class="text red">{{ctx.Locale.TrN .Activity.Code.Deletions "repo.activity.git_stats_deletion_1" "repo.activity.git_stats_deletion_n" .Activity.Code.Deletions}}</strong>. 106 </div> 107 <div class="ui attached segment"> 108 <div id="repo-activity-top-authors-chart"></div> 109 </div> 110 </div> 111 {{end}} 112 {{end}} 113 114 {{if gt .Activity.PublishedReleaseCount 0}} 115 <h4 class="divider divider-text" id="published-releases"> 116 {{svg "octicon-tag" 16 "tw-mr-2"}} 117 {{ctx.Locale.Tr "repo.activity.title.releases_published_by" 118 (ctx.Locale.TrN .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n" .Activity.PublishedReleaseCount) 119 (ctx.Locale.TrN .Activity.PublishedReleaseAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.PublishedReleaseAuthorCount) 120 }} 121 </h4> 122 <div class="list"> 123 {{range .Activity.PublishedReleases}} 124 <p class="desc"> 125 <span class="ui green label">{{ctx.Locale.Tr "repo.activity.published_release_label"}}</span> 126 {{.TagName}} 127 {{if not .IsTag}} 128 <a class="title" href="{{$.RepoLink}}/src/{{.TagName | PathEscapeSegments}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> 129 {{end}} 130 {{TimeSinceUnix .CreatedUnix ctx.Locale}} 131 </p> 132 {{end}} 133 </div> 134 {{end}} 135 136 {{if gt .Activity.MergedPRCount 0}} 137 <h4 class="divider divider-text" id="merged-pull-requests"> 138 {{svg "octicon-git-pull-request" 16 "tw-mr-2"}} 139 {{ctx.Locale.Tr "repo.activity.title.prs_merged_by" 140 (ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.MergedPRCount) 141 (ctx.Locale.TrN .Activity.MergedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.MergedPRAuthorCount) 142 }} 143 </h4> 144 <div class="list"> 145 {{range .Activity.MergedPRs}} 146 <p class="desc"> 147 <span class="ui purple label">{{ctx.Locale.Tr "repo.activity.merged_prs_label"}}</span> 148 #{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> 149 {{TimeSinceUnix .MergedUnix ctx.Locale}} 150 </p> 151 {{end}} 152 </div> 153 {{end}} 154 155 {{if gt .Activity.OpenedPRCount 0}} 156 <h4 class="divider divider-text" id="proposed-pull-requests"> 157 {{svg "octicon-git-branch" 16 "tw-mr-2"}} 158 {{ctx.Locale.Tr "repo.activity.title.prs_opened_by" 159 (ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.OpenedPRCount) 160 (ctx.Locale.TrN .Activity.OpenedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.OpenedPRAuthorCount) 161 }} 162 </h4> 163 <div class="list"> 164 {{range .Activity.OpenedPRs}} 165 <p class="desc"> 166 <span class="ui green label">{{ctx.Locale.Tr "repo.activity.opened_prs_label"}}</span> 167 #{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> 168 {{TimeSinceUnix .Issue.CreatedUnix ctx.Locale}} 169 </p> 170 {{end}} 171 </div> 172 {{end}} 173 174 {{if gt .Activity.ClosedIssueCount 0}} 175 <h4 class="divider divider-text" id="closed-issues"> 176 {{svg "octicon-issue-closed" 16 "tw-mr-2"}} 177 {{ctx.Locale.Tr "repo.activity.title.issues_closed_from" 178 (ctx.Locale.TrN .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.ClosedIssueCount) 179 (ctx.Locale.TrN .Activity.ClosedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.ClosedIssueAuthorCount) 180 }} 181 </h4> 182 <div class="list"> 183 {{range .Activity.ClosedIssues}} 184 <p class="desc"> 185 <span class="ui red label">{{ctx.Locale.Tr "repo.activity.closed_issue_label"}}</span> 186 #{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> 187 {{TimeSinceUnix .ClosedUnix ctx.Locale}} 188 </p> 189 {{end}} 190 </div> 191 {{end}} 192 193 {{if gt .Activity.OpenedIssueCount 0}} 194 <h4 class="divider divider-text" id="new-issues"> 195 {{svg "octicon-issue-opened" 16 "tw-mr-2"}} 196 {{ctx.Locale.Tr "repo.activity.title.issues_created_by" 197 (ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.OpenedIssueCount) 198 (ctx.Locale.TrN .Activity.OpenedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.OpenedIssueAuthorCount) 199 }} 200 </h4> 201 <div class="list"> 202 {{range .Activity.OpenedIssues}} 203 <p class="desc"> 204 <span class="ui green label">{{ctx.Locale.Tr "repo.activity.new_issue_label"}}</span> 205 #{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> 206 {{TimeSinceUnix .CreatedUnix ctx.Locale}} 207 </p> 208 {{end}} 209 </div> 210 {{end}} 211 212 {{if gt .Activity.UnresolvedIssueCount 0}} 213 <h4 class="divider divider-text" id="unresolved-conversations" data-tooltip-content="{{ctx.Locale.Tr "repo.activity.unresolved_conv_desc"}}"> 214 {{svg "octicon-comment-discussion" 16 "tw-mr-2"}} 215 {{ctx.Locale.TrN .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n" .Activity.UnresolvedIssueCount}} 216 </h4> 217 <div class="list"> 218 {{range .Activity.UnresolvedIssues}} 219 <p class="desc"> 220 <span class="ui green label">{{ctx.Locale.Tr "repo.activity.unresolved_conv_label"}}</span> 221 #{{.Index}} 222 {{if .IsPull}} 223 <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> 224 {{else}} 225 <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> 226 {{end}} 227 {{TimeSinceUnix .UpdatedUnix ctx.Locale}} 228 </p> 229 {{end}} 230 </div> 231 {{end}}