2020-03-13 05:09:23 -04:00
|
|
|
%li.d-flex.align-items-center.key-list-item
|
2020-07-15 05:09:34 -04:00
|
|
|
.gl-mr-3
|
2017-08-21 10:01:05 -04:00
|
|
|
- if key.valid?
|
2020-03-13 05:09:23 -04:00
|
|
|
- if key.expired?
|
|
|
|
%span.d-inline-block.has-tooltip{ title: s_('Profiles|Your key has expired') }
|
2020-08-10 14:09:54 -04:00
|
|
|
= sprite_icon('warning-solid', css_class: 'settings-list-icon d-none d-sm-block')
|
2020-03-13 05:09:23 -04:00
|
|
|
- else
|
2020-08-10 14:09:54 -04:00
|
|
|
= sprite_icon('key', css_class: 'settings-list-icon d-none d-sm-block ')
|
2017-08-21 10:01:05 -04:00
|
|
|
- else
|
2020-03-13 05:09:23 -04:00
|
|
|
%span.d-inline-block.has-tooltip{ title: key.errors.full_messages.join(', ') }
|
2020-08-10 14:09:54 -04:00
|
|
|
= sprite_icon('warning-solid', css_class: 'settings-list-icon d-none d-sm-block')
|
2017-08-21 10:01:05 -04:00
|
|
|
|
2020-03-13 05:09:23 -04:00
|
|
|
.key-list-item-info.w-100.float-none
|
2016-02-29 12:19:00 -05:00
|
|
|
= link_to path_to_key(key, is_admin), class: "title" do
|
|
|
|
= key.title
|
2019-12-09 07:07:58 -05:00
|
|
|
%span.text-truncate
|
2016-02-29 12:19:00 -05:00
|
|
|
= key.fingerprint
|
2020-03-13 05:09:23 -04:00
|
|
|
|
|
|
|
.key-list-item-dates.d-flex.align-items-start.justify-content-between
|
2020-07-15 05:09:34 -04:00
|
|
|
%span.last-used-at.gl-mr-3
|
2020-03-13 05:09:23 -04:00
|
|
|
= s_('Profiles|Last used:')
|
|
|
|
= key.last_used_at ? time_ago_with_tooltip(key.last_used_at) : _('Never')
|
2020-07-15 05:09:34 -04:00
|
|
|
%span.expires.gl-mr-3
|
2020-03-13 05:09:23 -04:00
|
|
|
= s_('Profiles|Expires:')
|
|
|
|
= key.expires_at ? key.expires_at.to_date : _('Never')
|
|
|
|
%span.key-created-at
|
|
|
|
= s_('Profiles|Created %{time_ago}'.html_safe) % { time_ago:time_ago_with_tooltip(key.created_at)}
|
|
|
|
- if key.can_delete?
|
2020-07-17 05:09:43 -04:00
|
|
|
= link_to path_to_key(key, is_admin), data: { confirm: _('Are you sure?')}, method: :delete, class: "btn btn-transparent gl-ml-3 align-baseline" do
|
2020-03-13 05:09:23 -04:00
|
|
|
%span.sr-only= _('Remove')
|
2020-08-10 14:09:54 -04:00
|
|
|
= sprite_icon('remove')
|