2019-11-02 06:02:41 +08: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">
|
|
|
|
{{ $r:= List .Commits}}
|
|
|
|
{{range $r}}
|
|
|
|
<tr>
|
|
|
|
<td class="author">
|
2019-11-04 18:20:12 +08:00
|
|
|
{{$userName := .Author.Name}}
|
2019-11-02 06:02:41 +08:00
|
|
|
{{if .User}}
|
|
|
|
{{if .User.FullName}}
|
2019-11-04 18:20:12 +08:00
|
|
|
{{$userName = .User.FullName}}
|
2019-11-02 06:02:41 +08:00
|
|
|
{{end}}
|
2019-11-04 18:20:12 +08:00
|
|
|
<img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{$userName}}</a>
|
2019-11-02 06:02:41 +08:00
|
|
|
{{else}}
|
|
|
|
<img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/> {{$userName}}
|
|
|
|
{{end}}
|
|
|
|
</td>
|
|
|
|
<td class="sha">
|
2019-11-04 18:20:12 +08:00
|
|
|
{{$class := "ui sha label"}}
|
|
|
|
{{if .Signature}}
|
|
|
|
{{$class = (printf "%s%s" $class " isSigned")}}
|
|
|
|
{{if .Verification.Verified}}
|
2020-02-28 03:20:55 +08: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 18:20:12 +08:00
|
|
|
{{else if .Verification.Warning}}
|
|
|
|
{{$class = (printf "%s%s" $class " isWarning")}}
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2020-05-17 00:38:40 +08:00
|
|
|
{{if $.PageIsWiki}}
|
|
|
|
<a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/wiki/commit/{{.ID}}" rel="nofollow" class="{{$class}}">
|
|
|
|
{{else if $.Reponame}}
|
2019-11-04 18:20:12 +08:00
|
|
|
<a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}" rel="nofollow" class="{{$class}}">
|
|
|
|
{{else}}
|
|
|
|
<span class="{{$class}}">
|
|
|
|
{{end}}
|
2020-02-28 03:20:55 +08:00
|
|
|
<span class="shortsha">{{ShortSha .ID.String}}</span>
|
2019-11-02 06:02:41 +08:00
|
|
|
{{if .Signature}}
|
|
|
|
<div class="ui detail icon button">
|
|
|
|
{{if .Verification.Verified}}
|
2020-02-28 03:20:55 +08:00
|
|
|
<div title="{{if eq .Verification.TrustStatus "trusted"}}{{else if eq .Verification.TrustStatus "untrusted"}}{{$.i18n.Tr "repo.commits.signed_by_untrusted_user"}}: {{else}}{{$.i18n.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: {{end}}{{.Verification.Reason}}">
|
|
|
|
{{if ne .Verification.SigningUser.ID 0}}
|
|
|
|
<i class="lock icon"></i>
|
|
|
|
<img class="ui signature avatar image" src="{{.Verification.SigningUser.RelAvatarLink}}" />
|
|
|
|
{{else}}
|
|
|
|
<i title="{{.Verification.Reason}}" class="icons">
|
|
|
|
<i class="lock icon"></i>
|
|
|
|
<i class="tiny inverted cog icon centerlock"></i>
|
|
|
|
</i>
|
|
|
|
<img class="ui signature avatar image" src="{{AvatarLink .Verification.SigningEmail}}" />
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2019-11-04 18:20:12 +08:00
|
|
|
{{else}}
|
2019-11-02 06:02:41 +08:00
|
|
|
<i title="{{$.i18n.Tr .Verification.Reason}}" class="unlock icon"></i>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2019-11-04 18:20:12 +08:00
|
|
|
{{if $.Reponame}}
|
|
|
|
</a>
|
|
|
|
{{else}}
|
|
|
|
</span>
|
|
|
|
{{end}}
|
2019-11-02 06:02:41 +08:00
|
|
|
</td>
|
|
|
|
<td class="message">
|
|
|
|
<span class="message-wrapper">
|
2019-12-04 02:15:41 +08:00
|
|
|
{{if $.PageIsWiki}}
|
2020-05-02 01:58:45 +08:00
|
|
|
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary | RenderEmoji}}</span>
|
2019-12-04 02:15:41 +08:00
|
|
|
{{else }}
|
2019-11-02 06:02:41 +08:00
|
|
|
{{ $commitLink:= printf "%s/%s/%s/commit/%s" AppSubUrl $.Username $.Reponame .ID }}
|
2020-05-02 01:58:45 +08:00
|
|
|
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject .Message $.RepoLink $commitLink $.Repository.ComposeMetas}}</span>
|
2019-12-04 02:15:41 +08:00
|
|
|
{{end}}
|
2019-11-02 06:02:41 +08:00
|
|
|
</span>
|
|
|
|
{{if IsMultilineCommitMessage .Message}}
|
|
|
|
<button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
|
|
|
|
{{end}}
|
|
|
|
{{if eq (CommitType .) "SignCommitWithStatuses"}}
|
2019-11-04 18:20:12 +08:00
|
|
|
{{template "repo/commit_status" .Status}}
|
2019-11-02 06:02:41 +08:00
|
|
|
{{end}}
|
|
|
|
{{if IsMultilineCommitMessage .Message}}
|
|
|
|
<pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $.RepoLink $.Repository.ComposeMetas}}</pre>
|
|
|
|
{{end}}
|
|
|
|
</td>
|
2019-12-18 05:34:11 +08:00
|
|
|
<td class="text right aligned">{{TimeSince .Author.When $.Lang}}</td>
|
2019-11-02 06:02:41 +08:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|