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

33 lines
1.5 KiB
Text
Raw Normal View History

2020-04-08 14:13:33 +05:30
%li.d-flex.align-items-center.key-list-item
2020-07-28 23:09:34 +05:30
.gl-mr-3
2018-03-17 18:26:18 +05:30
- if key.valid?
2020-04-08 14:13:33 +05:30
- if key.expired?
%span.d-inline-block.has-tooltip{ title: s_('Profiles|Your key has expired') }
2020-10-24 23:57:45 +05:30
= sprite_icon('warning-solid', css_class: 'settings-list-icon d-none d-sm-block')
2020-04-08 14:13:33 +05:30
- else
2020-10-24 23:57:45 +05:30
= sprite_icon('key', css_class: 'settings-list-icon d-none d-sm-block ')
2018-03-17 18:26:18 +05:30
- else
2020-04-08 14:13:33 +05:30
%span.d-inline-block.has-tooltip{ title: key.errors.full_messages.join(', ') }
2020-10-24 23:57:45 +05:30
= sprite_icon('warning-solid', css_class: 'settings-list-icon d-none d-sm-block')
2018-03-17 18:26:18 +05:30
2020-04-08 14:13:33 +05:30
.key-list-item-info.w-100.float-none
2016-06-02 11:05:42 +05:30
= link_to path_to_key(key, is_admin), class: "title" do
= key.title
2020-01-01 13:55:28 +05:30
%span.text-truncate
2016-06-02 11:05:42 +05:30
= key.fingerprint
2020-04-08 14:13:33 +05:30
.key-list-item-dates.d-flex.align-items-start.justify-content-between
2020-07-28 23:09:34 +05:30
%span.last-used-at.gl-mr-3
2020-04-08 14:13:33 +05:30
= s_('Profiles|Last used:')
= key.last_used_at ? time_ago_with_tooltip(key.last_used_at) : _('Never')
2020-07-28 23:09:34 +05:30
%span.expires.gl-mr-3
2020-04-08 14:13:33 +05:30
= s_('Profiles|Expires:')
= key.expires_at ? key.expires_at.to_date : _('Never')
2021-01-03 14:25:43 +05:30
%span.key-created-at.gl-display-flex.gl-align-items-center
= s_('Profiles|Created%{time_ago}'.html_safe) % { time_ago: time_ago_with_tooltip(key.created_at, html_class: 'gl-ml-2')}
2020-04-08 14:13:33 +05:30
- if key.can_delete?
2021-01-03 14:25:43 +05:30
.gl-ml-3
= button_to '#', class: "btn btn-default gl-button btn-default-tertiary js-confirm-modal-button", data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin)) do
%span.sr-only= _('Delete')
= sprite_icon('remove')