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