2022-05-16 10:45:12 -06:00
|
|
|
<div class="ui attached table segment commit-table">
|
2023-07-04 11:45:45 -06:00
|
|
|
<table class="ui very basic striped table unstackable" id="commits-table">
|
2019-11-01 16:02:41 -06:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2022-10-25 11:00:37 -06:00
|
|
|
<th class="three wide">{{.locale.Tr "repo.commits.author"}}</th>
|
2019-11-01 16:02:41 -06:00
|
|
|
<th class="two wide sha">SHA1</th>
|
2022-10-25 11:00:37 -06:00
|
|
|
<th class="nine wide message">{{.locale.Tr "repo.commits.message"}}</th>
|
|
|
|
<th class="two wide right aligned">{{.locale.Tr "repo.commits.date"}}</th>
|
2019-11-01 16:02:41 -06:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody class="commit-list">
|
2022-01-18 09:12:10 -07:00
|
|
|
{{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}}
|
2021-08-09 12:08:51 -06:00
|
|
|
{{range .Commits}}
|
2019-11-01 16:02:41 -06:00
|
|
|
<tr>
|
|
|
|
<td class="author">
|
2019-11-04 03:20:12 -07:00
|
|
|
{{$userName := .Author.Name}}
|
2019-11-01 16:02:41 -06:00
|
|
|
{{if .User}}
|
|
|
|
{{if .User.FullName}}
|
2019-11-04 03:20:12 -07:00
|
|
|
{{$userName = .User.FullName}}
|
2019-11-01 16:02:41 -06:00
|
|
|
{{end}}
|
2023-08-09 21:19:39 -06:00
|
|
|
{{ctx.AvatarUtils.Avatar .User 28 "gt-mr-2"}}<a href="{{.User.HomeLink}}">{{$userName}}</a>
|
2019-11-01 16:02:41 -06:00
|
|
|
{{else}}
|
2023-08-09 21:19:39 -06:00
|
|
|
{{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "gt-mr-2"}}
|
2020-12-03 11:46:11 -07:00
|
|
|
{{$userName}}
|
2019-11-01 16:02:41 -06:00
|
|
|
{{end}}
|
|
|
|
</td>
|
2023-02-13 10:59:59 -07:00
|
|
|
<td class="sha gt-df">
|
|
|
|
<button class="ui button copy-commit-sha gt-df gt-ac" data-clipboard-text="{{.ID}}">{{svg "octicon-copy" 14}}</button>
|
2019-11-04 03:20:12 -07:00
|
|
|
{{$class := "ui sha label"}}
|
|
|
|
{{if .Signature}}
|
|
|
|
{{$class = (printf "%s%s" $class " isSigned")}}
|
|
|
|
{{if .Verification.Verified}}
|
2020-02-27 12:20:55 -07:00
|
|
|
{{if eq .Verification.TrustStatus "trusted"}}
|
|
|
|
{{$class = (printf "%s%s" $class " isVerified")}}
|
|
|
|
{{else if eq .Verification.TrustStatus "untrusted"}}
|
|
|
|
{{$class = (printf "%s%s" $class " isVerifiedUntrusted")}}
|
|
|
|
{{else}}
|
|
|
|
{{$class = (printf "%s%s" $class " isVerifiedUnmatched")}}
|
|
|
|
{{end}}
|
2019-11-04 03:20:12 -07:00
|
|
|
{{else if .Verification.Warning}}
|
|
|
|
{{$class = (printf "%s%s" $class " isWarning")}}
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2020-05-16 10:38:40 -06:00
|
|
|
{{if $.PageIsWiki}}
|
2022-01-18 09:12:10 -07:00
|
|
|
<a href="{{$commitRepoLink}}/wiki/commit/{{.ID}}" rel="nofollow" class="{{$class}}">
|
2020-05-16 10:38:40 -06:00
|
|
|
{{else if $.Reponame}}
|
2022-01-18 09:12:10 -07:00
|
|
|
<a href="{{$commitRepoLink}}/commit/{{.ID}}" rel="nofollow" class="{{$class}}">
|
2019-11-04 03:20:12 -07:00
|
|
|
{{else}}
|
|
|
|
<span class="{{$class}}">
|
|
|
|
{{end}}
|
2020-02-27 12:20:55 -07:00
|
|
|
<span class="shortsha">{{ShortSha .ID.String}}</span>
|
2019-11-01 16:02:41 -06:00
|
|
|
{{if .Signature}}
|
2020-06-02 18:22:26 -06:00
|
|
|
{{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}
|
2019-11-01 16:02:41 -06:00
|
|
|
{{end}}
|
2023-06-14 12:17:58 -06:00
|
|
|
{{if $.PageIsWiki}}
|
|
|
|
</a>
|
|
|
|
{{else if $.Reponame}}
|
2019-11-04 03:20:12 -07:00
|
|
|
</a>
|
|
|
|
{{else}}
|
|
|
|
</span>
|
|
|
|
{{end}}
|
2019-11-01 16:02:41 -06:00
|
|
|
</td>
|
|
|
|
<td class="message">
|
|
|
|
<span class="message-wrapper">
|
2019-12-03 11:15:41 -07:00
|
|
|
{{if $.PageIsWiki}}
|
2023-03-05 14:59:05 -07:00
|
|
|
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary | RenderEmoji $.Context}}</span>
|
2022-08-25 15:55:52 -06:00
|
|
|
{{else}}
|
|
|
|
{{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}}
|
2022-01-19 16:26:57 -07:00
|
|
|
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.Context .Message $commitRepoLink $commitLink $.Repository.ComposeMetas}}</span>
|
2019-12-03 11:15:41 -07:00
|
|
|
{{end}}
|
2019-11-01 16:02:41 -06:00
|
|
|
</span>
|
|
|
|
{{if IsMultilineCommitMessage .Message}}
|
2023-07-27 04:47:41 -06:00
|
|
|
<button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button>
|
2019-11-01 16:02:41 -06:00
|
|
|
{{end}}
|
2021-08-09 12:08:51 -06:00
|
|
|
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $}}
|
2019-11-01 16:02:41 -06:00
|
|
|
{{if IsMultilineCommitMessage .Message}}
|
2023-02-18 21:06:14 -07:00
|
|
|
<pre class="commit-body gt-hidden">{{RenderCommitBody $.Context .Message $commitRepoLink $.Repository.ComposeMetas}}</pre>
|
2019-11-01 16:02:41 -06:00
|
|
|
{{end}}
|
|
|
|
</td>
|
2022-01-24 15:11:40 -07:00
|
|
|
{{if .Committer}}
|
2022-06-27 14:58:46 -06:00
|
|
|
<td class="text right aligned">{{TimeSince .Committer.When $.locale}}</td>
|
2022-01-24 15:11:40 -07:00
|
|
|
{{else}}
|
2022-06-27 14:58:46 -06:00
|
|
|
<td class="text right aligned">{{TimeSince .Author.When $.locale}}</td>
|
2022-01-24 15:11:40 -07:00
|
|
|
{{end}}
|
2019-11-01 16:02:41 -06:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|