diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2019-08-05 17:34:26 +1000 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2019-08-05 17:34:26 +1000 |
commit | afbcf479c263dd5a2b52f6f48fb8ce540e5250fc (patch) | |
tree | 0a07576a491e07c0c159e1f603b656a60871a6bb /app/views/settings/keys/_key.html.haml | |
parent | 15c2e501eab61f4827b463764fa4d40341131af0 (diff) | |
download | gitlab-ce-afbcf479c263dd5a2b52f6f48fb8ce540e5250fc.tar.gz |
Diffstat (limited to 'app/views/settings/keys/_key.html.haml')
-rw-r--r-- | app/views/settings/keys/_key.html.haml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/views/settings/keys/_key.html.haml b/app/views/settings/keys/_key.html.haml new file mode 100644 index 00000000000..b9d73d89334 --- /dev/null +++ b/app/views/settings/keys/_key.html.haml @@ -0,0 +1,24 @@ +%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 + .description + = 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') |