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
.gpg-popover-icon.invalid
= render 'shared/icons/icon_status_notfound_borderless.svg'
%div
This commit was signed with a different user's verified signature.
This commit was signed with a different user's verified signature.
- content = capture do
= render partial: 'projects/commit/signature_badge_user', locals: { signature: signature }
- locals = { signature: signature, title: title, content: content, label: 'Unverified', css_classes: ['invalid'] }
- locals = { signature: signature, title: title, label: 'Unverified', css_class: 'invalid', icon: 'icon_status_notfound_borderless', show_user: true }
= render partial: 'projects/commit/signature_badge', locals: locals
- title = capture do
.gpg-popover-icon.invalid
= render 'shared/icons/icon_status_notfound_borderless.svg'
%div
This commit was signed with a verified signature, but the committer email
is <strong>not verified</strong> to belong to the same user.
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
= render partial: 'projects/commit/signature_badge_user', locals: { signature: signature }
- locals = { signature: signature, title: title, content: content, label: 'Unverified', css_classes: ['invalid'] }
- locals = { signature: signature, title: title, label: 'Unverified', css_class: ['invalid'], icon: 'icon_status_notfound_borderless', show_user: true }
= 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
.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 } }
......
- title = capture do
.gpg-popover-icon.invalid
= render 'shared/icons/icon_status_notfound_borderless.svg'
%div
This commit was signed with an <strong>unverified</strong> signature.
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
- title = capture do
.gpg-popover-icon.valid
= render 'shared/icons/icon_status_success_borderless.svg'
%div
This commit was signed with a <strong>verified</strong> signature and the
committer email is verified to belong to the same user.
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
= render partial: 'projects/commit/signature_badge_user', locals: { signature: signature }
- locals = { signature: signature, title: title, content: content, label: 'Verified', css_classes: ['valid'] }
- locals = { signature: signature, title: title, label: 'Verified', css_class: 'valid', icon: 'icon_status_success_borderless', show_user: true }
= 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