Reuse show page for user keys.
This commit is contained in:
parent
492f3a4779
commit
f0085d034b
3 changed files with 24 additions and 19 deletions
4
app/views/admin/users/key.html.haml
Normal file
4
app/views/admin/users/key.html.haml
Normal 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"
|
19
app/views/profiles/keys/_key_details.html.haml
Normal file
19
app/views/profiles/keys/_key_details.html.haml
Normal 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
|
|
@ -1,22 +1,4 @@
|
||||||
.row
|
= render "key_details"
|
||||||
.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
|
|
||||||
|
|
||||||
.pull-right
|
.pull-right
|
||||||
= link_to 'Remove', profile_key_path(@key), data: {confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove delete-key"
|
= link_to 'Remove', profile_key_path(@key), data: {confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove delete-key"
|
||||||
|
|
Loading…
Reference in a new issue