From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/repo/pulse.tmpl | 239 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 239 insertions(+) create mode 100644 templates/repo/pulse.tmpl (limited to 'templates/repo/pulse.tmpl') diff --git a/templates/repo/pulse.tmpl b/templates/repo/pulse.tmpl new file mode 100644 index 0000000..3554cf6 --- /dev/null +++ b/templates/repo/pulse.tmpl @@ -0,0 +1,239 @@ +

+ {{DateTime "long" .DateFrom}} - {{DateTime "long" .DateUntil}} + + +

+ +{{if (or (.Permission.CanRead $.UnitTypeIssues) (.Permission.CanRead $.UnitTypePullRequests))}} +

{{ctx.Locale.Tr "repo.activity.overview"}}

+
+ {{if .Permission.CanRead $.UnitTypePullRequests}} +
+ {{if gt .Activity.ActivePRCount 0}} +
+ {{if gt .Activity.MergedPRPerc 0}} + + {{end}} + +
+ {{else}} +
+ +
+ {{end}} + {{ctx.Locale.TrN .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n" .Activity.ActivePRCount}} +
+ {{end}} + {{if .Permission.CanRead $.UnitTypeIssues}} +
+ {{if gt .Activity.ActiveIssueCount 0}} +
+ {{if gt .Activity.ClosedIssuePerc 0}} + + {{end}} + +
+ {{else}} +
+ +
+ {{end}} + {{ctx.Locale.TrN .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n" .Activity.ActiveIssueCount}} +
+ {{end}} +
+ +{{end}} + +{{if .Permission.CanRead $.UnitTypeCode}} + {{if eq .Activity.Code.CommitCountInAllBranches 0}} +
+

{{ctx.Locale.Tr "repo.activity.no_git_activity"}}

+
+ {{end}} + {{if gt .Activity.Code.CommitCountInAllBranches 0}} +
+
+ {{ctx.Locale.Tr "repo.activity.git_stats_exclude_merges"}} + {{ctx.Locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_author_1" "repo.activity.git_stats_author_n" .Activity.Code.AuthorCount}} + {{ctx.Locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_pushed_1" "repo.activity.git_stats_pushed_n"}} + {{ctx.Locale.TrN .Activity.Code.CommitCount "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCount}} + {{ctx.Locale.Tr "repo.activity.git_stats_push_to_branch" .Repository.DefaultBranch}} + {{ctx.Locale.TrN .Activity.Code.CommitCountInAllBranches "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCountInAllBranches}} + {{ctx.Locale.Tr "repo.activity.git_stats_push_to_all_branches"}} + {{ctx.Locale.Tr "repo.activity.git_stats_on_default_branch" .Repository.DefaultBranch}} + {{ctx.Locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_file_1" "repo.activity.git_stats_file_n" .Activity.Code.ChangedFiles}} + {{ctx.Locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_files_changed_1" "repo.activity.git_stats_files_changed_n"}} + {{ctx.Locale.Tr "repo.activity.git_stats_additions"}} + {{ctx.Locale.TrN .Activity.Code.Additions "repo.activity.git_stats_addition_1" "repo.activity.git_stats_addition_n" .Activity.Code.Additions}} + {{ctx.Locale.Tr "repo.activity.git_stats_and_deletions"}} + {{ctx.Locale.TrN .Activity.Code.Deletions "repo.activity.git_stats_deletion_1" "repo.activity.git_stats_deletion_n" .Activity.Code.Deletions}}. +
+
+
+
+
+ {{end}} +{{end}} + +{{if gt .Activity.PublishedReleaseCount 0}} +

+ {{svg "octicon-tag" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.activity.title.releases_published_by" + (ctx.Locale.TrN .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n" .Activity.PublishedReleaseCount) + (ctx.Locale.TrN .Activity.PublishedReleaseAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.PublishedReleaseAuthorCount) + }} +

+
+ {{range .Activity.PublishedReleases}} +

+ {{if .IsTag}} + {{ctx.Locale.Tr "repo.activity.published_tag_label"}} + {{else if .IsPrerelease}} + {{ctx.Locale.Tr "repo.activity.published_prerelease_label"}} + {{else}} + {{ctx.Locale.Tr "repo.activity.published_release_label"}} + {{end}} + {{if .IsTag}} + {{.TagName}} + {{else}} + {{.TagName}} + {{.Title | RenderEmoji $.Context | RenderCodeBlock}} + {{end}} + {{TimeSinceUnix .CreatedUnix ctx.Locale}} +

+ {{end}} +
+{{end}} + +{{if gt .Activity.MergedPRCount 0}} +

+ {{svg "octicon-git-pull-request" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.activity.title.prs_merged_by" + (ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.MergedPRCount) + (ctx.Locale.TrN .Activity.MergedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.MergedPRAuthorCount) + }} +

+
+ {{range .Activity.MergedPRs}} +

+ {{ctx.Locale.Tr "repo.activity.merged_prs_label"}} + #{{.Index}} {{RenderRefIssueTitle $.Context .Issue.Title}} + {{TimeSinceUnix .MergedUnix ctx.Locale}} +

+ {{end}} +
+{{end}} + +{{if gt .Activity.OpenedPRCount 0}} +

+ {{svg "octicon-git-branch" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.activity.title.prs_opened_by" + (ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.OpenedPRCount) + (ctx.Locale.TrN .Activity.OpenedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.OpenedPRAuthorCount) + }} +

+
+ {{range .Activity.OpenedPRs}} +

+ {{ctx.Locale.Tr "repo.activity.opened_prs_label"}} + #{{.Index}} {{RenderRefIssueTitle $.Context .Issue.Title}} + {{TimeSinceUnix .Issue.CreatedUnix ctx.Locale}} +

+ {{end}} +
+{{end}} + +{{if gt .Activity.ClosedIssueCount 0}} +

+ {{svg "octicon-issue-closed" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.activity.title.issues_closed_from" + (ctx.Locale.TrN .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.ClosedIssueCount) + (ctx.Locale.TrN .Activity.ClosedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.ClosedIssueAuthorCount) + }} +

+
+ {{range .Activity.ClosedIssues}} +

+ {{ctx.Locale.Tr "repo.activity.closed_issue_label"}} + #{{.Index}} {{RenderRefIssueTitle $.Context .Title}} + {{TimeSinceUnix .ClosedUnix ctx.Locale}} +

+ {{end}} +
+{{end}} + +{{if gt .Activity.OpenedIssueCount 0}} +

+ {{svg "octicon-issue-opened" 16 "tw-mr-2"}} + {{ctx.Locale.Tr "repo.activity.title.issues_created_by" + (ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.OpenedIssueCount) + (ctx.Locale.TrN .Activity.OpenedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.OpenedIssueAuthorCount) + }} +

+
+ {{range .Activity.OpenedIssues}} +

+ {{ctx.Locale.Tr "repo.activity.new_issue_label"}} + #{{.Index}} {{RenderRefIssueTitle $.Context .Title}} + {{TimeSinceUnix .CreatedUnix ctx.Locale}} +

+ {{end}} +
+{{end}} + +{{if gt .Activity.UnresolvedIssueCount 0}} +

+ {{svg "octicon-comment-discussion" 16 "tw-mr-2"}} + {{ctx.Locale.TrN .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n" .Activity.UnresolvedIssueCount}} +

+
+ {{range .Activity.UnresolvedIssues}} +

+ {{ctx.Locale.Tr "repo.activity.unresolved_conv_label"}} + #{{.Index}} + {{if .IsPull}} + {{RenderRefIssueTitle $.Context .Title}} + {{else}} + {{RenderRefIssueTitle $.Context .Title}} + {{end}} + {{TimeSinceUnix .UpdatedUnix ctx.Locale}} +

+ {{end}} +
+{{end}} -- cgit v1.2.3