Reuse show page for user keys.

This commit is contained in:
Marin Jankovski 2014-12-29 17:09:39 +01:00
parent 492f3a4779
commit f0085d034b
3 changed files with 24 additions and 19 deletions

View file

@ -0,0 +1,4 @@
= render "profiles/keys/key_details"
.pull-right
= link_to 'Remove', remove_user_key_admin_user_path(@user, @key), data: {confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove delete-key"

View file

@ -0,0 +1,19 @@
.row
.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:
%strong= @key.created_at.stamp("Aug 21, 2011")
.col-md-8
%p
%span.light Fingerprint:
%strong= @key.fingerprint
%pre.well-pre
= @key.key

View file

@ -1,22 +1,4 @@
.row
.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:
%strong= @key.created_at.stamp("Aug 21, 2011")
.col-md-8
%p
%span.light Fingerprint:
%strong= @key.fingerprint
%pre.well-pre
= @key.key
= render "key_details"
.pull-right
= link_to 'Remove', profile_key_path(@key), data: {confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove delete-key"