summaryrefslogtreecommitdiff
path: root/app/views/profiles/keys/_key_details.html.haml
blob: 8f7ccadd10884f8b9ae4841bc52d078f9cf115d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
- is_admin = defined?(admin) ? true : false
.row.gl-mt-3
  .col-md-4
    .card
      .card-header
        = _('SSH Key')
      %ul.content-list
        %li
          %span.light= _('Title:')
          %strong= @key.title
        %li
          %span.light= _('Created on:')
          %strong= @key.created_at.to_s(:medium)
        %li
          %span.light= _('Expires:')
          %strong= @key.expires_at.try(:to_s, :medium) || _('Never')
        %li
          %span.light= _('Last used on:')
          %strong= @key.last_used_at.try(:to_s, :medium) || _('Never')

  .col-md-8
    = form_errors(@key, type: 'key', pajamas_alert: true) unless @key.valid?
    %pre.well-pre
      = @key.key
    .card
      .card-header
        = _('Fingerprints')
      %ul.content-list
        %li
          %span.light= 'MD5:'
          %code.key-fingerprint= @key.fingerprint
        - if @key.fingerprint_sha256.present?
          %li
            %span.light= 'SHA256:'
            %code.key-fingerprint= @key.fingerprint_sha256


  .col-md-12
    .float-right
      - if @key.can_delete?
        = render 'shared/ssh_keys/key_delete', text: _('Delete'), html_class: "btn btn-danger gl-button delete-key js-confirm-modal-button", button_data: ssh_key_delete_modal_data(@key, path_to_key(@key, is_admin))