code.gitea.io/gitea@v1.22.3/templates/repo/commits_list_small.tmpl (about) 1 {{$index := 0}} 2 <div class="timeline-item commits-list"> 3 {{range .comment.Commits}} 4 {{$tag := printf "%s-%d" $.comment.HashTag $index}} 5 {{$index = Eval $index "+" 1}} 6 <div class="singular-commit" id="{{$tag}}"> 7 <span class="badge badge-commit">{{svg "octicon-git-commit"}}</span> 8 {{if .User}} 9 <a class="avatar" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20}}</a> 10 {{else}} 11 {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 20}} 12 {{end}} 13 14 {{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}} 15 16 <span class="tw-flex-1 tw-font-mono gt-ellipsis" title="{{.Summary}}"> 17 {{- RenderCommitMessageLinkSubject $.root.Context .Message $commitLink ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}} 18 </span> 19 20 {{if IsMultilineCommitMessage .Message}} 21 <button class="ui button ellipsis-button show-panel toggle" data-panel="[data-singular-commit-body-for='{{$tag}}']">...</button> 22 {{end}} 23 24 <span class="shabox tw-flex tw-items-center"> 25 {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} 26 {{$class := "ui sha label"}} 27 {{if .Signature}} 28 {{$class = (print $class " isSigned")}} 29 {{if .Verification.Verified}} 30 {{if eq .Verification.TrustStatus "trusted"}} 31 {{$class = (print $class " isVerified")}} 32 {{else if eq .Verification.TrustStatus "untrusted"}} 33 {{$class = (print $class " isVerifiedUntrusted")}} 34 {{else}} 35 {{$class = (print $class " isVerifiedUnmatched")}} 36 {{end}} 37 {{else if .Verification.Warning}} 38 {{$class = (print $class " isWarning")}} 39 {{end}} 40 {{end}} 41 <a href="{{$commitLink}}" rel="nofollow" class="tw-ml-2 {{$class}}"> 42 <span class="shortsha">{{ShortSha .ID.String}}</span> 43 {{if .Signature}} 44 {{template "repo/shabox_badge" dict "root" $.root "verification" .Verification}} 45 {{end}} 46 </a> 47 </span> 48 </div> 49 {{if IsMultilineCommitMessage .Message}} 50 <pre class="commit-body tw-ml-[33px] tw-hidden" data-singular-commit-body-for="{{$tag}}"> 51 {{- RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}} 52 </pre> 53 {{end}} 54 {{end}} 55 </div>