_valid_signature_badge.html.haml 975 Bytes
Newer Older
1
- title = capture do
2 3
  .gpg-popover-icon.valid
    = render 'shared/icons/icon_status_success_borderless.svg'
4 5
  %div
    This commit was signed with a <strong>verified</strong> signature.
6 7 8

- content = capture do
  - gpg_key = signature.gpg_key
9 10 11
  - user = gpg_key&.user
  - user_name = signature.gpg_key_user_name
  - user_email = signature.gpg_key_user_email
12

13 14 15 16
  - if user
    = link_to user_path(user), class: 'gpg-popover-user-link' do
      %div
        = user_avatar_without_link(user: user, size: 32)
17

18
      %div
19 20
        %strong= gpg_key.user.name
        %div @#{gpg_key.user.username}
21 22 23 24 25 26 27 28
  - else
    = mail_to user_email do
      %div
        = user_avatar_without_link(user_name: user_name, user_email: user_email, size: 32)

      %div
        %strong= user_name
        %div= user_email
29 30 31 32

- locals = { signature: signature, title: title, content: content, label: 'Verified', css_classes: ['valid'] }

= render partial: 'projects/commit/signature_badge', locals: locals