debian-mirror-gitlab/app/views/profiles/keys/_key.html.haml

34 lines
1.6 KiB
Text
Raw Normal View History

2021-03-11 19:13:27 +05:30
%li.key-list-item
.gl-display-flex.gl-align-items-flex-start
.key-list-item-info.gl-w-full.float-none
= link_to path_to_key(key, is_admin), class: "title text-3" do
= key.title
2018-03-17 18:26:18 +05:30
2021-03-11 19:13:27 +05:30
.gl-display-flex.gl-align-items-center.gl-mt-2
- if key.valid?
- if key.expired?
%span.gl-display-inline-block.has-tooltip{ title: s_('Profiles|Your key has expired') }
= sprite_icon('warning-solid', css_class: 'settings-list-icon gl-display-none gl-sm-display-block')
- else
= sprite_icon('key', css_class: 'settings-list-icon gl-display-none gl-sm-display-block')
- else
%span.gl-display-inline-block.has-tooltip{ title: key.errors.full_messages.join(', ') }
= sprite_icon('warning-solid', css_class: 'settings-list-icon gl-display-none gl-sm-display-block')
2020-04-08 14:13:33 +05:30
2021-03-11 19:13:27 +05:30
%span.gl-text-truncate.gl-sm-ml-3
= key.fingerprint
.gl-mt-3= s_('Profiles|Created%{time_ago}'.html_safe) % { time_ago: time_ago_with_tooltip(key.created_at, html_class: 'gl-ml-2')}
.key-list-item-dates
%span.last-used-at.gl-mr-3
= s_('Profiles|Last used:')
= key.last_used_at ? time_ago_with_tooltip(key.last_used_at) : _('Never')
%span.expires.gl-mr-3
= s_('Profiles|Expires:')
= key.expires_at ? key.expires_at.to_date : _('Never')
%span.key-created-at.gl-display-flex.gl-align-items-center
- if key.can_delete?
.gl-ml-3
= render 'shared/ssh_keys/key_delete', html_class: "btn gl-button btn-icon btn-danger js-confirm-modal-button", button_data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin))