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/commits_list.tmpl | 96 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 templates/repo/commits_list.tmpl (limited to 'templates/repo/commits_list.tmpl') diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl new file mode 100644 index 0000000..c8c695e --- /dev/null +++ b/templates/repo/commits_list.tmpl @@ -0,0 +1,96 @@ +
+ + + + + + + + + + + + {{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}} + {{range .Commits}} + + + + + {{if .Committer}} + + {{else}} + + {{end}} + + + {{end}} + +
{{ctx.Locale.Tr "repo.commits.author"}}{{StringUtils.ToUpper $.Repository.ObjectFormatName}}{{ctx.Locale.Tr "repo.commits.message"}}{{ctx.Locale.Tr "repo.commits.date"}}
+
+ {{$userName := .Author.Name}} + {{if .User}} + {{if and .User.FullName DefaultShowFullName}} + {{$userName = .User.FullName}} + {{end}} + {{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}{{$userName}} + {{else}} + {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}} + {{$userName}} + {{end}} +
+
+ {{$class := "ui sha label"}} + {{if .Signature}} + {{$class = (print $class " isSigned")}} + {{if .Verification.Verified}} + {{if eq .Verification.TrustStatus "trusted"}} + {{$class = (print $class " isVerified")}} + {{else if eq .Verification.TrustStatus "untrusted"}} + {{$class = (print $class " isVerifiedUntrusted")}} + {{else}} + {{$class = (print $class " isVerifiedUnmatched")}} + {{end}} + {{else if .Verification.Warning}} + {{$class = (print $class " isWarning")}} + {{end}} + {{end}} + {{$commitShaLink := ""}} + {{if $.PageIsWiki}} + {{$commitShaLink = (printf "%s/wiki/commit/%s" $commitRepoLink (PathEscape .ID.String))}} + {{else if $.PageIsPullCommits}} + {{$commitShaLink = (printf "%s/pulls/%d/commits/%s" $commitRepoLink $.Issue.Index (PathEscape .ID.String))}} + {{else if $.Reponame}} + {{$commitShaLink = (printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String))}} + {{end}} + + {{ShortSha .ID.String}} + {{if .Signature}}{{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}{{end}} + + + + {{if $.PageIsWiki}} + {{.Summary | RenderEmoji $.Context}} + {{else}} + {{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}} + {{RenderCommitMessageLinkSubject $.Context .Message $commitLink ($.Repository.ComposeMetas ctx)}} + {{end}} + + {{if IsMultilineCommitMessage .Message}} + + {{end}} + {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} + {{if IsMultilineCommitMessage .Message}} +
{{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}
+ {{end}} +
{{TimeSince .Committer.When ctx.Locale}}{{TimeSince .Author.When ctx.Locale}} + + {{if not $.PageIsWiki}} + + {{svg "octicon-file-code"}} + + {{end}} +
+
-- cgit v1.2.3