2021-04-12 08:09:15 -04:00
|
|
|
- icon_classes = 'settings-list-icon gl-display-none gl-sm-display-block'
|
|
|
|
|
2021-02-15 04:09:00 -05:00
|
|
|
%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
|
2017-08-21 10:01:05 -04:00
|
|
|
|
2021-02-15 04:09:00 -05:00
|
|
|
.gl-display-flex.gl-align-items-center.gl-mt-2
|
2021-04-12 08:09:15 -04:00
|
|
|
- if key.valid? && !key.expired?
|
|
|
|
= sprite_icon('key', css_class: icon_classes)
|
2021-02-15 04:09:00 -05:00
|
|
|
- else
|
2021-04-12 08:09:15 -04:00
|
|
|
%span.gl-display-inline-block.has-tooltip{ title: ssh_key_expiration_tooltip(key) }
|
|
|
|
= sprite_icon('warning-solid', css_class: icon_classes)
|
2020-03-13 05:09:23 -04:00
|
|
|
|
2021-02-15 04:09:00 -05:00
|
|
|
%span.gl-text-truncate.gl-sm-ml-3
|
|
|
|
= key.fingerprint
|
|
|
|
|
2022-09-16 11:14:12 -04:00
|
|
|
.gl-mt-3= html_escape(s_('Profiles|Created%{time_ago}')) % { time_ago: time_ago_with_tooltip(key.created_at, html_class: 'gl-ml-2').html_safe}
|
2021-02-15 04:09:00 -05:00
|
|
|
|
|
|
|
.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
|
2021-04-15 20:09:09 -04:00
|
|
|
= key.expired? ? s_('Profiles|Expired:') : s_('Profiles|Expires:')
|
2021-02-15 04:09:00 -05:00
|
|
|
= 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
|
2021-05-13 23:10:11 -04:00
|
|
|
= render 'shared/ssh_keys/key_delete', html_class: "btn gl-button btn-icon btn-default js-confirm-modal-button", button_data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin))
|