2022-05-16 18:45:12 +02:00
|
|
|
<div class="ui attached table segment commit-table">
|
2023-07-04 19:45:45 +02:00
|
|
|
<table class="ui very basic striped table unstackable" id="commits-table">
|
2019-11-01 23:02:41 +01:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2023-09-25 10:56:50 +02:00
|
|
|
<th class="three wide">{{ctx.Locale.Tr "repo.commits.author"}}</th>
|
2024-01-19 17:05:02 +01:00
|
|
|
<th class="two wide sha">{{StringUtils.ToUpper $.Repository.ObjectFormatName}}</th>
|
2023-10-02 06:04:32 +02:00
|
|
|
<th class="eight wide message">{{ctx.Locale.Tr "repo.commits.message"}}</th>
|
2023-09-25 10:56:50 +02:00
|
|
|
<th class="two wide right aligned">{{ctx.Locale.Tr "repo.commits.date"}}</th>
|
2023-10-09 09:19:23 +02:00
|
|
|
<th class="one wide"></th>
|
2019-11-01 23:02:41 +01:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody class="commit-list">
|
2022-01-18 17:12:10 +01:00
|
|
|
{{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}}
|
2021-08-09 20:08:51 +02:00
|
|
|
{{range .Commits}}
|
2019-11-01 23:02:41 +01:00
|
|
|
<tr>
|
|
|
|
<td class="author">
|
2019-11-04 11:20:12 +01:00
|
|
|
{{$userName := .Author.Name}}
|
2019-11-01 23:02:41 +01:00
|
|
|
{{if .User}}
|
|
|
|
{{if .User.FullName}}
|
2019-11-04 11:20:12 +01:00
|
|
|
{{$userName = .User.FullName}}
|
2019-11-01 23:02:41 +01:00
|
|
|
{{end}}
|
2023-08-10 05:19:39 +02:00
|
|
|
{{ctx.AvatarUtils.Avatar .User 28 "gt-mr-2"}}<a href="{{.User.HomeLink}}">{{$userName}}</a>
|
2019-11-01 23:02:41 +01:00
|
|
|
{{else}}
|
2023-08-10 05:19:39 +02:00
|
|
|
{{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "gt-mr-2"}}
|
2020-12-03 19:46:11 +01:00
|
|
|
{{$userName}}
|
2019-11-01 23:02:41 +01:00
|
|
|
{{end}}
|
|
|
|
</td>
|
2023-10-09 09:19:23 +02:00
|
|
|
<td class="sha">
|
2019-11-04 11:20:12 +01:00
|
|
|
{{$class := "ui sha label"}}
|
|
|
|
{{if .Signature}}
|
2023-09-16 05:51:54 +02:00
|
|
|
{{$class = (print $class " isSigned")}}
|
2019-11-04 11:20:12 +01:00
|
|
|
{{if .Verification.Verified}}
|
2020-02-27 20:20:55 +01:00
|
|
|
{{if eq .Verification.TrustStatus "trusted"}}
|
2023-09-16 05:51:54 +02:00
|
|
|
{{$class = (print $class " isVerified")}}
|
2020-02-27 20:20:55 +01:00
|
|
|
{{else if eq .Verification.TrustStatus "untrusted"}}
|
2023-09-16 05:51:54 +02:00
|
|
|
{{$class = (print $class " isVerifiedUntrusted")}}
|
2020-02-27 20:20:55 +01:00
|
|
|
{{else}}
|
2023-09-16 05:51:54 +02:00
|
|
|
{{$class = (print $class " isVerifiedUnmatched")}}
|
2020-02-27 20:20:55 +01:00
|
|
|
{{end}}
|
2019-11-04 11:20:12 +01:00
|
|
|
{{else if .Verification.Warning}}
|
2023-09-16 05:51:54 +02:00
|
|
|
{{$class = (print $class " isWarning")}}
|
2019-11-04 11:20:12 +01:00
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2023-09-03 04:58:52 +02:00
|
|
|
{{$commitShaLink := ""}}
|
2020-05-16 18:38:40 +02:00
|
|
|
{{if $.PageIsWiki}}
|
2023-09-03 04:58:52 +02:00
|
|
|
{{$commitShaLink = (printf "%s/wiki/commit/%s" $commitRepoLink (PathEscape .ID.String))}}
|
2023-08-13 11:04:42 +02:00
|
|
|
{{else if $.PageIsPullCommits}}
|
2023-09-03 04:58:52 +02:00
|
|
|
{{$commitShaLink = (printf "%s/pulls/%d/commits/%s" $commitRepoLink $.Issue.Index (PathEscape .ID.String))}}
|
2020-05-16 18:38:40 +02:00
|
|
|
{{else if $.Reponame}}
|
2023-09-03 04:58:52 +02:00
|
|
|
{{$commitShaLink = (printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String))}}
|
2019-11-04 11:20:12 +01:00
|
|
|
{{end}}
|
2023-09-03 04:58:52 +02:00
|
|
|
<a {{if $commitShaLink}}href="{{$commitShaLink}}"{{end}} class="{{$class}}">
|
2020-02-27 20:20:55 +01:00
|
|
|
<span class="shortsha">{{ShortSha .ID.String}}</span>
|
2023-09-03 04:58:52 +02:00
|
|
|
{{if .Signature}}{{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}{{end}}
|
|
|
|
</a>
|
2019-11-01 23:02:41 +01:00
|
|
|
</td>
|
|
|
|
<td class="message">
|
|
|
|
<span class="message-wrapper">
|
2019-12-03 19:15:41 +01:00
|
|
|
{{if $.PageIsWiki}}
|
2023-03-05 22:59:05 +01:00
|
|
|
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary | RenderEmoji $.Context}}</span>
|
2022-08-25 23:55:52 +02:00
|
|
|
{{else}}
|
|
|
|
{{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}}
|
2024-01-15 09:49:24 +01:00
|
|
|
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.Context .Message $commitLink ($.Repository.ComposeMetas ctx)}}</span>
|
2019-12-03 19:15:41 +01:00
|
|
|
{{end}}
|
2019-11-01 23:02:41 +01:00
|
|
|
</span>
|
|
|
|
{{if IsMultilineCommitMessage .Message}}
|
2023-07-27 12:47:41 +02:00
|
|
|
<button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button>
|
2019-11-01 23:02:41 +01:00
|
|
|
{{end}}
|
2023-11-02 15:49:02 +01:00
|
|
|
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}}
|
2019-11-01 23:02:41 +01:00
|
|
|
{{if IsMultilineCommitMessage .Message}}
|
2024-01-15 09:49:24 +01:00
|
|
|
<pre class="commit-body gt-hidden">{{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}</pre>
|
2019-11-01 23:02:41 +01:00
|
|
|
{{end}}
|
|
|
|
</td>
|
2022-01-24 23:11:40 +01:00
|
|
|
{{if .Committer}}
|
2023-09-25 14:42:40 +02:00
|
|
|
<td class="text right aligned">{{TimeSince .Committer.When ctx.Locale}}</td>
|
2022-01-24 23:11:40 +01:00
|
|
|
{{else}}
|
2023-09-25 14:42:40 +02:00
|
|
|
<td class="text right aligned">{{TimeSince .Author.When ctx.Locale}}</td>
|
2022-01-24 23:11:40 +01:00
|
|
|
{{end}}
|
2023-10-09 09:19:23 +02:00
|
|
|
<td class="text right aligned gt-py-0">
|
|
|
|
<button class="btn interact-bg gt-p-3" data-tooltip-content="{{ctx.Locale.Tr "copy_hash"}}" data-clipboard-text="{{.ID}}">{{svg "octicon-copy"}}</button>
|
2024-02-13 09:07:59 +01:00
|
|
|
<a
|
|
|
|
class="btn interact-bg gt-p-3"
|
|
|
|
data-tooltip-content="{{ctx.Locale.Tr "repo.commits.view_path"}}"
|
|
|
|
href="{{if $.FileName}}{{printf "%s/src/commit/%s/%s" $commitRepoLink (PathEscape .ID.String) (PathEscapeSegments $.FileName)}}{{else}}{{printf "%s/src/commit/%s" $commitRepoLink (PathEscape .ID.String)}}{{end}}">
|
|
|
|
{{svg "octicon-file-code"}}
|
|
|
|
</a>
|
2023-10-02 06:04:32 +02:00
|
|
|
</td>
|
2019-11-01 23:02:41 +01:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|