2019-11-02 01:02:41 +03:00
<div class="ui attached table segment">
<table class="ui very basic striped fixed table single line" id="commits-table">
<thead>
<tr>
<th class="four wide"> {{ .i18n .Tr "repo.commits.author" }} </th>
<th class="two wide sha">SHA1</th>
<th class="seven wide message"> {{ .i18n .Tr "repo.commits.message" }} </th>
<th class="three wide right aligned"> {{ .i18n .Tr "repo.commits.date" }} </th>
</tr>
</thead>
<tbody class="commit-list">
2021-08-09 21:08:51 +03:00
{{ range .Commits }}
2019-11-02 01:02:41 +03:00
<tr>
<td class="author">
2019-11-04 13:20:12 +03:00
{{ $ userName : = .Author .Name }}
2019-11-02 01:02:41 +03:00
{{ if .User }}
{{ if .User .FullName }}
2019-11-04 13:20:12 +03:00
{{ $ userName = .User .FullName }}
2019-11-02 01:02:41 +03:00
{{ end }}
2021-11-16 21:18:25 +03:00
{{ avatar .User 2 8 "mr-2" }} <a href=" {{ .User .HomeLink }} "> {{ $ userName }} </a>
2019-11-02 01:02:41 +03:00
{{ else }}
2020-12-03 21:46:11 +03:00
{{ avatarByEmail .Author .Email .Author .Name 2 8 "mr-2" }}
{{ $ userName }}
2019-11-02 01:02:41 +03:00
{{ end }}
</td>
<td class="sha">
2019-11-04 13:20:12 +03:00
{{ $ class : = "ui sha label" }}
{{ if .Signature }}
{{ $ class = ( printf "%s%s" $ class " isSigned" ) }}
{{ if .Verification .Verified }}
2020-02-27 22:20:55 +03: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 13:20:12 +03:00
{{ else if .Verification .Warning }}
{{ $ class = ( printf "%s%s" $ class " isWarning" ) }}
{{ end }}
{{ end }}
2020-05-16 19:38:40 +03:00
{{ if $ .PageIsWiki }}
2021-11-16 21:18:25 +03:00
<a href=" {{ $ .RepoLink }} /wiki/commit/ {{ .ID }} " rel="nofollow" class=" {{ $ class }} ">
2020-05-16 19:38:40 +03:00
{{ else if $ .Reponame }}
2021-11-16 21:18:25 +03:00
<a href=" {{ $ .RepoLink }} /commit/ {{ .ID }} " rel="nofollow" class=" {{ $ class }} ">
2019-11-04 13:20:12 +03:00
{{ else }}
<span class=" {{ $ class }} ">
{{ end }}
2020-02-27 22:20:55 +03:00
<span class="shortsha"> {{ ShortSha .ID .String }} </span>
2019-11-02 01:02:41 +03:00
{{ if .Signature }}
2020-06-03 03:22:26 +03:00
{{ template "repo/shabox_badge" dict "root" $ "verification" .Verification }}
2019-11-02 01:02:41 +03:00
{{ end }}
2019-11-04 13:20:12 +03:00
{{ if $ .Reponame }}
</a>
{{ else }}
</span>
{{ end }}
2019-11-02 01:02:41 +03:00
</td>
<td class="message">
<span class="message-wrapper">
2019-12-03 21:15:41 +03:00
{{ if $ .PageIsWiki }}
2020-05-01 20:58:45 +03:00
<span class="commit-summary {{ if gt .ParentCount 1 }} grey text {{ end }} " title=" {{ .Summary }} "> {{ .Summary | RenderEmoji }} </span>
2019-12-03 21:15:41 +03:00
{{ else }}
2021-11-16 21:18:25 +03:00
{{ $ commitLink : = printf "%s/commit/%s" $ .RepoLink ( PathEscape .ID .String ) }}
2020-05-01 20:58:45 +03:00
<span class="commit-summary {{ if gt .ParentCount 1 }} grey text {{ end }} " title=" {{ .Summary }} "> {{ RenderCommitMessageLinkSubject .Message $ .RepoLink $ commitLink $ .Repository .ComposeMetas }} </span>
2019-12-03 21:15:41 +03:00
{{ end }}
2019-11-02 01:02:41 +03:00
</span>
{{ if IsMultilineCommitMessage .Message }}
<button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
{{ end }}
2021-08-09 21:08:51 +03:00
{{ template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $ }}
2019-11-02 01:02:41 +03:00
{{ if IsMultilineCommitMessage .Message }}
<pre class="commit-body" style="display: none;"> {{ RenderCommitBody .Message $ .RepoLink $ .Repository .ComposeMetas }} </pre>
{{ end }}
</td>
2019-12-18 00:34:11 +03:00
<td class="text right aligned"> {{ TimeSince .Author .When $ .Lang }} </td>
2019-11-02 01:02:41 +03:00
</tr>
{{ end }}
</tbody>
</table>
</div>