_key_details.html.haml 801 字节
Newer Older
1
- is_admin = defined?(admin) ? true : false
P
Phil Hughes 已提交
2
.row.prepend-top-default
M
Marin Jankovski 已提交
3 4 5 6 7 8 9 10 11 12
  .col-md-4
    .panel.panel-default
      .panel-heading
        SSH Key
      %ul.well-list
        %li
          %span.light Title:
          %strong= @key.title
        %li
          %span.light Created on:
13
          %strong= @key.created_at.to_s(:medium)
14 15 16
        %li
          %span.light Last used on:
          %strong= @key.last_used_at.try(:to_s, :medium) || 'N/A'
M
Marin Jankovski 已提交
17 18

  .col-md-8
N
Nick Thomas 已提交
19
    = form_errors(@key, type: 'key') unless @key.valid?
M
Marin Jankovski 已提交
20 21
    %p
      %span.light Fingerprint:
22
      %code.key-fingerprint= @key.fingerprint
M
Marin Jankovski 已提交
23 24
    %pre.well-pre
      = @key.key
25 26 27
  .col-md-12
    .pull-right
      = link_to 'Remove', path_to_key(@key, is_admin), data: {confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove delete-key"