summaryrefslogtreecommitdiff
path: root/app/views/projects/commit/_signature_badge.html.haml
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-08-31 21:29:54 +0200
committerAlexis Reigel <mail@koffeinfrei.org>2017-09-05 12:18:34 +0200
commit55acc66d962d4b120babda84cef1d5ab1a91f59f (patch)
tree3204cdeeaa375a1acc73adfc47a940dd3f7bc0de /app/views/projects/commit/_signature_badge.html.haml
parent3ffe35f3272792c9466797ffe9b3e1272e9f3c92 (diff)
downloadgitlab-ce-55acc66d962d4b120babda84cef1d5ab1a91f59f.tar.gz
dry up signature badge templates
since all the signature badge templates now have more or less the same content we can push most of it down to the main template `_signature_badge`.
Diffstat (limited to 'app/views/projects/commit/_signature_badge.html.haml')
-rw-r--r--app/views/projects/commit/_signature_badge.html.haml13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/views/projects/commit/_signature_badge.html.haml b/app/views/projects/commit/_signature_badge.html.haml
index d06b29db838..2224f267b8a 100644
--- a/app/views/projects/commit/_signature_badge.html.haml
+++ b/app/views/projects/commit/_signature_badge.html.haml
@@ -1,17 +1,20 @@
-- css_classes = commit_signature_badge_classes(css_classes)
+- css_classes = commit_signature_badge_classes(css_class)
- title = capture do
.gpg-popover-status
- = title
+ .gpg-popover-icon{ class: css_class }
+ = render "shared/icons/#{icon}.svg"
+ %div
+ = title
- content = capture do
- .clearfix
- = content
+ - if local_assigns.fetch(:show_user, false)
+ .clearfix
+ = render partial: 'projects/commit/signature_badge_user', locals: { signature: signature }
GPG Key ID:
%span.monospace= signature.gpg_key_primary_keyid
-
= link_to('Learn more about signing commits', help_page_path('user/project/repository/gpg_signed_commits/index.md'), class: 'gpg-popover-help-link')
%button{ class: css_classes, data: { toggle: 'popover', html: 'true', placement: 'auto top', title: title, content: content } }