debian-mirror-gitlab/app/views/profiles/keys/_key.html.haml
2020-01-01 13:55:28 +05:30

24 lines
928 B
Text

%li.key-list-item
.float-left.append-right-10
- if key.valid?
= icon 'key', class: 'settings-list-icon d-none d-sm-block'
- else
= icon 'exclamation-triangle', class: 'settings-list-icon d-none d-sm-block has-tooltip',
title: key.errors.full_messages.join(', ')
.key-list-item-info
= link_to path_to_key(key, is_admin), class: "title" do
= key.title
%span.text-truncate
= key.fingerprint
.last-used-at
last used:
= key.last_used_at ? time_ago_with_tooltip(key.last_used_at) : 'n/a'
.float-right
%span.key-created-at
= s_('Profiles|Created %{time_ago}'.html_safe) % { time_ago:time_ago_with_tooltip(key.created_at)}
- if key.can_delete?
= link_to path_to_key(key, is_admin), data: { confirm: _('Are you sure?')}, method: :delete, class: "btn btn-transparent prepend-left-10" do
%span.sr-only= _('Remove')
= icon('trash')