|
1 | 1 | <div id="rev-container">
|
2 |
| - <ul id="rev-list"> |
3 |
| - {{ range $commitI, $commit := .Graph.Commits }} |
4 |
| - <li id="commit-{{$commit.Rev}}" data-flow="{{$commit.Flow}}"> |
5 |
| - {{ if $commit.OnlyRelation }} |
6 |
| - <span /> |
7 |
| - {{ else }} |
8 |
| - <span class="sha" id="{{$commit.ShortRev}}"> |
9 |
| - {{$class := "ui sha label"}} |
10 |
| - {{if $commit.Commit.Signature}} |
11 |
| - {{$class = (printf "%s%s" $class " isSigned")}} |
12 |
| - {{if $commit.Verification.Verified}} |
13 |
| - {{if eq $commit.Verification.TrustStatus "trusted"}} |
14 |
| - {{$class = (printf "%s%s" $class " isVerified")}} |
15 |
| - {{else if eq $commit.Verification.TrustStatus "untrusted"}} |
16 |
| - {{$class = (printf "%s%s" $class " isVerifiedUntrusted")}} |
17 |
| - {{else}} |
18 |
| - {{$class = (printf "%s%s" $class " isVerifiedUnmatched")}} |
19 |
| - {{end}} |
20 |
| - {{else if $commit.Verification.Warning}} |
21 |
| - {{$class = (printf "%s%s" $class " isWarning")}} |
22 |
| - {{end}} |
23 |
| - {{end}} |
24 |
| - <a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Rev}}" rel="nofollow" class="{{$class}}"> |
25 |
| - <span class="shortsha">{{ShortSha $commit.Commit.ID.String}}</span> |
26 |
| - {{- if $commit.Commit.Signature -}} |
27 |
| - <span class="shortsha-pad"></span>{{template "repo/shabox_badge" dict "root" $ "verification" $commit.Verification}} |
28 |
| - {{- end -}} |
29 |
| - </a> |
30 |
| - </span> |
31 |
| - {{range $commit.Refs}} |
32 |
| - {{$refGroup := .RefGroup}} |
33 |
| - {{if eq $refGroup "pull"}} |
34 |
| - {{if $.HidePRRefs}} |
35 |
| - {{if (containGeneric $.SelectedBranches .Name) }} |
36 |
| - <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/pulls/{{.ShortName|PathEscape}}"> |
37 |
| - {{svg "octicon-git-pull-request" 16 "mr-2"}}#{{.ShortName}} |
38 |
| - </a> |
39 |
| - {{end}} |
40 |
| - {{else}} |
41 |
| - <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/pulls/{{.ShortName|PathEscape}}"> |
42 |
| - {{svg "octicon-git-pull-request" 16 "mr-2"}}#{{.ShortName}} |
43 |
| - </a> |
44 |
| - {{end}} |
45 |
| - {{else if eq $refGroup "tags"}} |
46 |
| - <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/src/tag/{{.ShortName|PathEscape}}"> |
47 |
| - {{svg "octicon-tag" 16 "mr-2"}}{{.ShortName}} |
48 |
| - </a> |
49 |
| - {{else if eq $refGroup "remotes"}} |
50 |
| - <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/src/commit/{{$commit.Rev}}"> |
51 |
| - {{svg "octicon-cross-reference" 16 "mr-2"}}{{.ShortName}} |
52 |
| - </a> |
53 |
| - {{else if eq $refGroup "heads"}} |
54 |
| - <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/src/branch/{{.ShortName|PathEscape}}"> |
55 |
| - {{svg "octicon-git-branch" 16 "mr-2"}}{{.ShortName}} |
56 |
| - </a> |
57 |
| - {{else}} |
58 |
| - <!-- Unknown ref type {{.Name}} --> |
59 |
| - {{end}} |
60 |
| - {{end}} |
61 |
| - — |
62 |
| - <span>{{RenderCommitMessage $commit.Subject $.RepoLink $.Repository.ComposeMetas}}</span> |
63 |
| - — |
64 |
| - <span class="author"> |
65 |
| - {{$userName := $commit.Commit.Author.Name}} |
66 |
| - {{if $commit.User}} |
67 |
| - {{if $commit.User.FullName}} |
68 |
| - {{$userName = $commit.User.FullName}} |
69 |
| - {{end}} |
70 |
| - <img class="ui avatar image" src="{{$commit.User.RelAvatarLink}}" alt=""/><a href="{{AppSubUrl}}/{{$commit.User.Name}}">{{$userName}}</a> |
71 |
| - {{else}} |
72 |
| - <img class="ui avatar image" src="{{AvatarLink $commit.Commit.Author.Email}}" alt=""/>{{$userName}} |
73 |
| - {{end}} |
74 |
| - </span> |
75 |
| - <span class="time">{{$commit.Date}}</span> |
76 |
| - {{ end }} |
77 |
| - </li> |
78 |
| - {{ end }} |
79 |
| - </ul> |
| 2 | + <ul id="rev-list"> |
| 3 | + {{ range $commitI, $commit := .Graph.Commits }} |
| 4 | + <li id="commit-{{$commit.Rev}}" data-flow="{{$commit.Flow}}"> |
| 5 | + {{ if $commit.OnlyRelation }} |
| 6 | + <span /> |
| 7 | + {{ else }} |
| 8 | + <span class="sha" id="{{$commit.ShortRev}}"> |
| 9 | + {{$class := "ui sha label"}} |
| 10 | + {{if $commit.Commit.Signature}} |
| 11 | + {{$class = (printf "%s%s" $class " isSigned")}} |
| 12 | + {{if $commit.Verification.Verified}} |
| 13 | + {{if eq $commit.Verification.TrustStatus "trusted"}} |
| 14 | + {{$class = (printf "%s%s" $class " isVerified")}} |
| 15 | + {{else if eq $commit.Verification.TrustStatus "untrusted"}} |
| 16 | + {{$class = (printf "%s%s" $class " isVerifiedUntrusted")}} |
| 17 | + {{else}} |
| 18 | + {{$class = (printf "%s%s" $class " isVerifiedUnmatched")}} |
| 19 | + {{end}} |
| 20 | + {{else if $commit.Verification.Warning}} |
| 21 | + {{$class = (printf "%s%s" $class " isWarning")}} |
| 22 | + {{end}} |
| 23 | + {{end}} |
| 24 | + <a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Rev}}" rel="nofollow" class="{{$class}}"> |
| 25 | + <span class="shortsha">{{ShortSha $commit.Commit.ID.String}}</span> |
| 26 | + {{- if $commit.Commit.Signature -}} |
| 27 | + <span class="shortsha-pad"></span>{{template "repo/shabox_badge" dict "root" $ "verification" $commit.Verification}} |
| 28 | + {{- end -}} |
| 29 | + </a> |
| 30 | + </span> |
| 31 | + {{range $commit.Refs}} |
| 32 | + {{$refGroup := .RefGroup}} |
| 33 | + {{if eq $refGroup "pull"}} |
| 34 | + {{if $.HidePRRefs}} |
| 35 | + {{if (containGeneric $.SelectedBranches .Name) }} |
| 36 | + <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/pulls/{{.ShortName|PathEscape}}"> |
| 37 | + {{svg "octicon-git-pull-request" 16 "mr-2"}}#{{.ShortName}} |
| 38 | + </a> |
| 39 | + {{end}} |
| 40 | + {{else}} |
| 41 | + <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/pulls/{{.ShortName|PathEscape}}"> |
| 42 | + {{svg "octicon-git-pull-request" 16 "mr-2"}}#{{.ShortName}} |
| 43 | + </a> |
| 44 | + {{end}} |
| 45 | + {{else if eq $refGroup "tags"}} |
| 46 | + <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/src/tag/{{.ShortName|PathEscape}}"> |
| 47 | + {{svg "octicon-tag" 16 "mr-2"}}{{.ShortName}} |
| 48 | + </a> |
| 49 | + {{else if eq $refGroup "remotes"}} |
| 50 | + <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/src/commit/{{$commit.Rev}}"> |
| 51 | + {{svg "octicon-cross-reference" 16 "mr-2"}}{{.ShortName}} |
| 52 | + </a> |
| 53 | + {{else if eq $refGroup "heads"}} |
| 54 | + <a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/src/branch/{{.ShortName|PathEscape}}"> |
| 55 | + {{svg "octicon-git-branch" 16 "mr-2"}}{{.ShortName}} |
| 56 | + </a> |
| 57 | + {{else}} |
| 58 | + <!-- Unknown ref type {{.Name}} --> |
| 59 | + {{end}} |
| 60 | + {{end}} |
| 61 | + — |
| 62 | + <span>{{RenderCommitMessage $commit.Subject $.RepoLink $.Repository.ComposeMetas}}</span> |
| 63 | + — |
| 64 | + <span class="author"> |
| 65 | + {{$userName := $commit.Commit.Author.Name}} |
| 66 | + {{if $commit.User}} |
| 67 | + {{if $commit.User.FullName}} |
| 68 | + {{$userName = $commit.User.FullName}} |
| 69 | + {{end}} |
| 70 | + <img class="ui avatar image" src="{{$commit.User.RelAvatarLink}}" alt=""/><a href="{{AppSubUrl}}/{{$commit.User.Name}}">{{$userName}}</a> |
| 71 | + {{else}} |
| 72 | + <img class="ui avatar image" src="{{AvatarLink $commit.Commit.Author.Email}}" alt=""/>{{$userName}} |
| 73 | + {{end}} |
| 74 | + </span> |
| 75 | + <span class="time">{{$commit.Date}}</span> |
| 76 | + {{ end }} |
| 77 | + </li> |
| 78 | + {{ end }} |
| 79 | + </ul> |
80 | 80 | </div>
|
0 commit comments