2019-11-02 03:32:41 +05:30
|
|
|
<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">
|
2022-01-18 21:42:10 +05:30
|
|
|
{{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}}
|
2021-08-09 23:38:51 +05:30
|
|
|
{{range .Commits}}
|
2019-11-02 03:32:41 +05:30
|
|
|
<tr>
|
|
|
|
<td class="author">
|
2019-11-04 15:50:12 +05:30
|
|
|
{{$userName := .Author.Name}}
|
2019-11-02 03:32:41 +05:30
|
|
|
{{if .User}}
|
|
|
|
{{if .User.FullName}}
|
2019-11-04 15:50:12 +05:30
|
|
|
{{$userName = .User.FullName}}
|
2019-11-02 03:32:41 +05:30
|
|
|
{{end}}
|
2021-11-16 23:48:25 +05:30
|
|
|
{{avatar .User 28 "mr-2"}}<a href="{{.User.HomeLink}}">{{$userName}}</a>
|
2019-11-02 03:32:41 +05:30
|
|
|
{{else}}
|
2020-12-04 00:16:11 +05:30
|
|
|
{{avatarByEmail .Author.Email .Author.Name 28 "mr-2"}}
|
|
|
|
{{$userName}}
|
2019-11-02 03:32:41 +05:30
|
|
|
{{end}}
|
|
|
|
</td>
|
2021-11-23 08:14:10 +05:30
|
|
|
<td class="sha df">
|
|
|
|
<button class="ui button copy-commit-sha df ac" data-clipboard-text="{{.ID}}">{{svg "octicon-copy" 14}}</button>
|
2019-11-04 15:50:12 +05:30
|
|
|
{{$class := "ui sha label"}}
|
|
|
|
{{if .Signature}}
|
|
|
|
{{$class = (printf "%s%s" $class " isSigned")}}
|
|
|
|
{{if .Verification.Verified}}
|
2020-02-28 00:50:55 +05:30
|
|
|
{{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 15:50:12 +05:30
|
|
|
{{else if .Verification.Warning}}
|
|
|
|
{{$class = (printf "%s%s" $class " isWarning")}}
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2020-05-16 22:08:40 +05:30
|
|
|
{{if $.PageIsWiki}}
|
2022-01-18 21:42:10 +05:30
|
|
|
<a href="{{$commitRepoLink}}/wiki/commit/{{.ID}}" rel="nofollow" class="{{$class}}">
|
2020-05-16 22:08:40 +05:30
|
|
|
{{else if $.Reponame}}
|
2022-01-18 21:42:10 +05:30
|
|
|
<a href="{{$commitRepoLink}}/commit/{{.ID}}" rel="nofollow" class="{{$class}}">
|
2019-11-04 15:50:12 +05:30
|
|
|
{{else}}
|
|
|
|
<span class="{{$class}}">
|
|
|
|
{{end}}
|
2020-02-28 00:50:55 +05:30
|
|
|
<span class="shortsha">{{ShortSha .ID.String}}</span>
|
2019-11-02 03:32:41 +05:30
|
|
|
{{if .Signature}}
|
2020-06-03 05:52:26 +05:30
|
|
|
{{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}
|
2019-11-02 03:32:41 +05:30
|
|
|
{{end}}
|
2019-11-04 15:50:12 +05:30
|
|
|
{{if $.Reponame}}
|
|
|
|
</a>
|
|
|
|
{{else}}
|
|
|
|
</span>
|
|
|
|
{{end}}
|
2019-11-02 03:32:41 +05:30
|
|
|
</td>
|
|
|
|
<td class="message">
|
|
|
|
<span class="message-wrapper">
|
2019-12-03 23:45:41 +05:30
|
|
|
{{if $.PageIsWiki}}
|
2020-05-01 23:28:45 +05:30
|
|
|
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary | RenderEmoji}}</span>
|
2019-12-03 23:45:41 +05:30
|
|
|
{{else }}
|
2022-01-18 21:42:10 +05:30
|
|
|
{{ $commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String) }}
|
|
|
|
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject .Message $commitRepoLink $commitLink $.Repository.ComposeMetas}}</span>
|
2019-12-03 23:45:41 +05:30
|
|
|
{{end}}
|
2019-11-02 03:32:41 +05:30
|
|
|
</span>
|
|
|
|
{{if IsMultilineCommitMessage .Message}}
|
2021-11-23 08:14:38 +05:30
|
|
|
<button class="ui button ellipsis-button" aria-expanded="false">...</button>
|
2019-11-02 03:32:41 +05:30
|
|
|
{{end}}
|
2021-08-09 23:38:51 +05:30
|
|
|
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $}}
|
2019-11-02 03:32:41 +05:30
|
|
|
{{if IsMultilineCommitMessage .Message}}
|
2022-01-18 21:42:10 +05:30
|
|
|
<pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $commitRepoLink $.Repository.ComposeMetas}}</pre>
|
2019-11-02 03:32:41 +05:30
|
|
|
{{end}}
|
|
|
|
</td>
|
2019-12-18 03:04:11 +05:30
|
|
|
<td class="text right aligned">{{TimeSince .Author.When $.Lang}}</td>
|
2019-11-02 03:32:41 +05:30
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|