diff options
author | Wenxuan Zhao <viz@linux.com> | 2019-11-04 02:20:12 -0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-11-04 18:20:12 +0800 |
commit | 0471aae348ea9e225ceaaa9049e0d40ece972877 (patch) | |
tree | 795a1298f1c157b86167ff480498d3af0a07afac | |
parent | ee5249889d7f9f3fbda4aa87dd3202753ed595cb (diff) | |
download | gitea-0471aae348ea9e225ceaaa9049e0d40ece972877.tar.gz gitea-0471aae348ea9e225ceaaa9049e0d40ece972877.zip |
Fix: remove duplicated signed commit icons (#8820)
Signed-off-by: Wenxuan Zhao <viz@linux.com>
-rw-r--r-- | templates/repo/commits_list.tmpl | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index 177c434724..dee9dab2b5 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -13,56 +13,55 @@ {{range $r}} <tr> <td class="author"> - {{$userName := .Author.Name}} + {{$userName := .Author.Name}} {{if .User}} {{if .User.FullName}} - {{$userName = .User.FullName}} + {{$userName = .User.FullName}} {{end}} - <img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{$userName}}</a> + <img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{$userName}}</a> {{else}} <img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/> {{$userName}} {{end}} </td> <td class="sha"> - {{$class := "ui sha label"}} - {{if .Signature}} - {{$class = (printf "%s%s" $class " isSigned")}} - {{if .Verification.Verified}} - {{$class = (printf "%s%s" $class " isVerified")}} - {{else if .Verification.Warning}} - {{$class = (printf "%s%s" $class " isWarning")}} - {{end}} - {{end}} - {{if $.Reponame}} - <a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}" rel="nofollow" class="{{$class}}"> - {{else}} - <span class="{{$class}}"> - {{end}} + {{$class := "ui sha label"}} + {{if .Signature}} + {{$class = (printf "%s%s" $class " isSigned")}} + {{if .Verification.Verified}} + {{$class = (printf "%s%s" $class " isVerified")}} + {{else if .Verification.Warning}} + {{$class = (printf "%s%s" $class " isWarning")}} + {{end}} + {{end}} + {{if $.Reponame}} + <a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}" rel="nofollow" class="{{$class}}"> + {{else}} + <span class="{{$class}}"> + {{end}} {{ShortSha .ID.String}} {{if .Signature}} <div class="ui detail icon button"> {{if .Verification.Verified}} - <i title="{{.Verification.Reason}}" class="lock green icon"></i> {{if ne .Verification.SigningUser.ID 0}} - <i title="{{.Verification.Reason}}" class="lock green icon"></i> - {{else}} - <i title="{{.Verification.Reason}}" class="icons"> - <i class="green lock icon"></i> - <i class="tiny inverted cog icon centerlock"></i> - </i> - {{end}} + <i title="{{.Verification.Reason}}" class="lock green icon"></i> + {{else}} + <i title="{{.Verification.Reason}}" class="icons"> + <i class="green lock icon"></i> + <i class="tiny inverted cog icon centerlock"></i> + </i> + {{end}} {{else if .Verification.Warning}} - <i title="{{$.i18n.Tr .Verification.Reason}}" class="red unlock icon"></i> - {{else}} + <i title="{{$.i18n.Tr .Verification.Reason}}" class="red unlock icon"></i> + {{else}} <i title="{{$.i18n.Tr .Verification.Reason}}" class="unlock icon"></i> {{end}} </div> {{end}} - {{if $.Reponame}} - </a> - {{else}} - </span> - {{end}} + {{if $.Reponame}} + </a> + {{else}} + </span> + {{end}} </td> <td class="message"> <span class="message-wrapper"> @@ -73,7 +72,7 @@ <button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button> {{end}} {{if eq (CommitType .) "SignCommitWithStatuses"}} - {{template "repo/commit_status" .Status}} + {{template "repo/commit_status" .Status}} {{end}} {{if IsMultilineCommitMessage .Message}} <pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $.RepoLink $.Repository.ComposeMetas}}</pre> |