Commit c8e4bbb1 authored by Alexis Reigel's avatar Alexis Reigel

extract partial for the signature badge user

parent e7be70a0
- gpg_key = signature.gpg_key
- user = gpg_key&.user
- user_name = signature.gpg_key_user_name
- user_email = signature.gpg_key_user_email
- if user
= link_to user_path(user), class: 'gpg-popover-user-link' do
%div
= user_avatar_without_link(user: user, size: 32)
%div
%strong= user.name
%div @#{user.username}
- 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
...@@ -5,27 +5,7 @@ ...@@ -5,27 +5,7 @@
This commit was signed with a <strong>verified</strong> signature. This commit was signed with a <strong>verified</strong> signature.
- content = capture do - content = capture do
- gpg_key = signature.gpg_key = render partial: 'projects/commit/signature_badge_user', locals: { signature: signature }
- user = gpg_key&.user
- user_name = signature.gpg_key_user_name
- user_email = signature.gpg_key_user_email
- if user
= link_to user_path(user), class: 'gpg-popover-user-link' do
%div
= user_avatar_without_link(user: user, size: 32)
%div
%strong= gpg_key.user.name
%div @#{gpg_key.user.username}
- 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
- locals = { signature: signature, title: title, content: content, label: 'Verified', css_classes: ['valid'] } - locals = { signature: signature, title: title, content: content, label: 'Verified', css_classes: ['valid'] }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment