Commit 55acc66d authored by Alexis Reigel's avatar Alexis Reigel

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`.
parent 3ffe35f3
- title = capture do - title = capture do
.gpg-popover-icon.invalid This commit was signed with a different user's verified signature.
= render 'shared/icons/icon_status_notfound_borderless.svg'
%div
This commit was signed with a different user's verified signature.
- content = capture do - locals = { signature: signature, title: title, label: 'Unverified', css_class: 'invalid', icon: 'icon_status_notfound_borderless', show_user: true }
= render partial: 'projects/commit/signature_badge_user', locals: { signature: signature }
- locals = { signature: signature, title: title, content: content, label: 'Unverified', css_classes: ['invalid'] }
= render partial: 'projects/commit/signature_badge', locals: locals = render partial: 'projects/commit/signature_badge', locals: locals
- title = capture do - title = capture do
.gpg-popover-icon.invalid This commit was signed with a verified signature, but the committer email
= render 'shared/icons/icon_status_notfound_borderless.svg' is <strong>not verified</strong> to belong to the same user.
%div
This commit was signed with a verified signature, but the committer email
is <strong>not verified</strong> to belong to the same user.
- content = capture do - locals = { signature: signature, title: title, label: 'Unverified', css_class: ['invalid'], icon: 'icon_status_notfound_borderless', show_user: true }
= render partial: 'projects/commit/signature_badge_user', locals: { signature: signature }
- locals = { signature: signature, title: title, content: content, label: 'Unverified', css_classes: ['invalid'] }
= render partial: 'projects/commit/signature_badge', locals: locals = render partial: 'projects/commit/signature_badge', locals: locals
- css_classes = commit_signature_badge_classes(css_classes) - css_classes = commit_signature_badge_classes(css_class)
- title = capture do - title = capture do
.gpg-popover-status .gpg-popover-status
= title .gpg-popover-icon{ class: css_class }
= render "shared/icons/#{icon}.svg"
%div
= title
- content = capture do - content = capture do
.clearfix - if local_assigns.fetch(:show_user, false)
= content .clearfix
= render partial: 'projects/commit/signature_badge_user', locals: { signature: signature }
GPG Key ID: GPG Key ID:
%span.monospace= signature.gpg_key_primary_keyid %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') = 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 } } %button{ class: css_classes, data: { toggle: 'popover', html: 'true', placement: 'auto top', title: title, content: content } }
......
- title = capture do - title = capture do
.gpg-popover-icon.invalid This commit was signed with an <strong>unverified</strong> signature.
= render 'shared/icons/icon_status_notfound_borderless.svg'
%div
This commit was signed with an <strong>unverified</strong> signature.
- locals = { signature: signature, title: title, label: 'Unverified', css_classes: ['invalid'] } - locals = { signature: signature, title: title, label: 'Unverified', css_class: 'invalid', icon: 'icon_status_notfound_borderless' }
= render partial: 'projects/commit/signature_badge', locals: locals = render partial: 'projects/commit/signature_badge', locals: locals
- title = capture do - title = capture do
.gpg-popover-icon.valid This commit was signed with a <strong>verified</strong> signature and the
= render 'shared/icons/icon_status_success_borderless.svg' committer email is verified to belong to the same user.
%div
This commit was signed with a <strong>verified</strong> signature and the
committer email is verified to belong to the same user.
- content = capture do - locals = { signature: signature, title: title, label: 'Verified', css_class: 'valid', icon: 'icon_status_success_borderless', show_user: true }
= render partial: 'projects/commit/signature_badge_user', locals: { signature: signature }
- locals = { signature: signature, title: title, content: content, label: 'Verified', css_classes: ['valid'] }
= render partial: 'projects/commit/signature_badge', locals: locals = render partial: 'projects/commit/signature_badge', locals: locals
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