code.gitea.io/gitea@v1.22.3/templates/repo/commits_list.tmpl (about) 1 <div class="ui attached table segment commit-table"> 2 <table class="ui very basic striped table unstackable" id="commits-table"> 3 <thead> 4 <tr> 5 <th class="three wide">{{ctx.Locale.Tr "repo.commits.author"}}</th> 6 <th class="two wide sha">{{StringUtils.ToUpper $.Repository.ObjectFormatName}}</th> 7 <th class="eight wide message">{{ctx.Locale.Tr "repo.commits.message"}}</th> 8 <th class="two wide right aligned">{{ctx.Locale.Tr "repo.commits.date"}}</th> 9 <th class="one wide"></th> 10 </tr> 11 </thead> 12 <tbody class="commit-list"> 13 {{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}} 14 {{range .Commits}} 15 <tr> 16 <td class="author"> 17 <div class="tw-flex"> 18 {{$userName := .Author.Name}} 19 {{if .User}} 20 {{if and .User.FullName DefaultShowFullName}} 21 {{$userName = .User.FullName}} 22 {{end}} 23 {{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}<a class="muted author-wrapper" href="{{.User.HomeLink}}">{{$userName}}</a> 24 {{else}} 25 {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}} 26 <span class="author-wrapper">{{$userName}}</span> 27 {{end}} 28 </div> 29 </td> 30 <td class="sha"> 31 {{$class := "ui sha label"}} 32 {{if .Signature}} 33 {{$class = (print $class " isSigned")}} 34 {{if .Verification.Verified}} 35 {{if eq .Verification.TrustStatus "trusted"}} 36 {{$class = (print $class " isVerified")}} 37 {{else if eq .Verification.TrustStatus "untrusted"}} 38 {{$class = (print $class " isVerifiedUntrusted")}} 39 {{else}} 40 {{$class = (print $class " isVerifiedUnmatched")}} 41 {{end}} 42 {{else if .Verification.Warning}} 43 {{$class = (print $class " isWarning")}} 44 {{end}} 45 {{end}} 46 {{$commitShaLink := ""}} 47 {{if $.PageIsWiki}} 48 {{$commitShaLink = (printf "%s/wiki/commit/%s" $commitRepoLink (PathEscape .ID.String))}} 49 {{else if $.PageIsPullCommits}} 50 {{$commitShaLink = (printf "%s/pulls/%d/commits/%s" $commitRepoLink $.Issue.Index (PathEscape .ID.String))}} 51 {{else if $.Reponame}} 52 {{$commitShaLink = (printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String))}} 53 {{end}} 54 <a {{if $commitShaLink}}href="{{$commitShaLink}}"{{end}} class="{{$class}}"> 55 <span class="shortsha">{{ShortSha .ID.String}}</span> 56 {{if .Signature}}{{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}{{end}} 57 </a> 58 </td> 59 <td class="message"> 60 <span class="message-wrapper"> 61 {{if $.PageIsWiki}} 62 <span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary | RenderEmoji $.Context}}</span> 63 {{else}} 64 {{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}} 65 <span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.Context .Message $commitLink ($.Repository.ComposeMetas ctx)}}</span> 66 {{end}} 67 </span> 68 {{if IsMultilineCommitMessage .Message}} 69 <button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button> 70 {{end}} 71 {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} 72 {{if IsMultilineCommitMessage .Message}} 73 <pre class="commit-body tw-hidden">{{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}</pre> 74 {{end}} 75 </td> 76 {{if .Committer}} 77 <td class="text right aligned">{{TimeSince .Committer.When ctx.Locale}}</td> 78 {{else}} 79 <td class="text right aligned">{{TimeSince .Author.When ctx.Locale}}</td> 80 {{end}} 81 <td class="text right aligned tw-py-0"> 82 <button class="btn interact-bg tw-p-2" data-tooltip-content="{{ctx.Locale.Tr "copy_hash"}}" data-clipboard-text="{{.ID}}">{{svg "octicon-copy"}}</button> 83 {{if not $.PageIsWiki}}{{/* at the moment, wiki doesn't support "view at history point*/}} 84 {{$viewCommitLink := printf "%s/src/commit/%s" $commitRepoLink (PathEscape .ID.String)}} 85 {{if $.FileName}}{{$viewCommitLink = printf "%s/%s" $viewCommitLink (PathEscapeSegments $.FileName)}}{{end}} 86 <a class="btn interact-bg tw-p-2" data-tooltip-content="{{ctx.Locale.Tr "repo.commits.view_path"}}" href="{{$viewCommitLink}}">{{svg "octicon-file-code"}}</a> 87 {{end}} 88 </td> 89 </tr> 90 {{end}} 91 </tbody> 92 </table> 93 </div>