debian-mirror-gitlab/app/views/profiles/gpg_keys/_key.html.haml
2019-09-04 21:01:54 +05:30

27 lines
1.2 KiB
Text

%li.key-list-item
.float-left.append-right-10
= icon 'key', class: "settings-list-icon d-none d-sm-block"
.key-list-item-info
- key.emails_with_verified_status.map do |email, verified|
= render partial: 'shared/email_with_badge', locals: { email: email, verified: verified }
.description
%code= key.fingerprint
- if key.subkeys.present?
.subkeys
%span.bold
= _('Subkeys')
= ':'
%ul.subkeys-list
- key.subkeys.each do |subkey|
%li
%code= subkey.fingerprint
.float-right
%span.key-created-at
= s_('Profiles|Created %{time_ago}'.html_safe) % { time_ago:time_ago_with_tooltip(key.created_at)}
= link_to profile_gpg_key_path(key), data: { confirm: _('Are you sure? Removing this GPG key does not affect already signed commits.') }, method: :delete, class: "btn btn-danger prepend-left-10" do
%span.sr-only= _('Remove')
= icon('trash')
= link_to revoke_profile_gpg_key_path(key), data: { confirm: _('Are you sure? All commits that were signed with this GPG key will be unverified.') }, method: :put, class: "btn btn-danger prepend-left-10" do
%span.sr-only= _('Revoke')
= _('Revoke')