aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/shabox_badge.tmpl
diff options
context:
space:
mode:
authorCirno the Strongest <1447794+CirnoT@users.noreply.github.com>2020-06-03 02:22:26 +0200
committerGitHub <noreply@github.com>2020-06-02 20:22:26 -0400
commitd0a18a12704360c06cf48b586956148a17a4505a (patch)
treeff3e08b375af392162784c2a2a10daf2f6109b35 /templates/repo/shabox_badge.tmpl
parenta1ad188326f9af633d2be0920a140275a4972bfe (diff)
downloadgitea-d0a18a12704360c06cf48b586956148a17a4505a.tar.gz
gitea-d0a18a12704360c06cf48b586956148a17a4505a.zip
Show full GPG commit status on PR commit history (#11702)
* Show full GPG commit status on PR commit history * move shabox badge to separate template * unnecessary $ Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'templates/repo/shabox_badge.tmpl')
-rw-r--r--templates/repo/shabox_badge.tmpl18
1 files changed, 18 insertions, 0 deletions
diff --git a/templates/repo/shabox_badge.tmpl b/templates/repo/shabox_badge.tmpl
new file mode 100644
index 0000000000..f4bd30fdb1
--- /dev/null
+++ b/templates/repo/shabox_badge.tmpl
@@ -0,0 +1,18 @@
+<div class="ui detail icon button">
+ {{if .verification.Verified}}
+ <div title="{{if eq .verification.TrustStatus "trusted"}}{{else if eq .verification.TrustStatus "untrusted"}}{{$.root.i18n.Tr "repo.commits.signed_by_untrusted_user"}}: {{else}}{{$.root.i18n.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: {{end}}{{.verification.Reason}}">
+ {{if ne .verification.SigningUser.ID 0}}
+ <i class="lock icon"></i>
+ <img class="ui signature avatar image" src="{{.verification.SigningUser.RelAvatarLink}}" />
+ {{else}}
+ <i title="{{.verification.Reason}}" class="icons">
+ <i class="lock icon"></i>
+ <i class="tiny inverted cog icon centerlock"></i>
+ </i>
+ <img class="ui signature avatar image" src="{{AvatarLink .verification.SigningEmail}}" />
+ {{end}}
+ </div>
+ {{else}}
+ <i title="{{$.root.i18n.Tr .verification.Reason}}" class="unlock icon"></i>
+ {{end}}
+</div>