Skip to content
Snippets Groups Projects
Commit c73748e3 authored by Rubén Dávila's avatar Rubén Dávila
Browse files

Render GPG subkeys on index page

parent 9b4990a4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -108,6 +108,15 @@
}
}
 
.subkeys-list {
@include basic-list;
li {
padding: 3px 0;
border: none;
}
}
.key-list-item {
.key-list-item-info {
@media (min-width: $screen-sm-min) {
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@ class Profiles::GpgKeysController < Profiles::ApplicationController
before_action :set_gpg_key, only: [:destroy, :revoke]
 
def index
@gpg_keys = current_user.gpg_keys
@gpg_keys = current_user.gpg_keys.with_subkeys
@gpg_key = GpgKey.new
end
 
Loading
Loading
Loading
Loading
@@ -12,6 +12,8 @@ class GpgKey < ActiveRecord::Base
has_many :gpg_signatures
has_many :subkeys, class_name: 'GpgKeySubkey'
 
scope :with_subkeys, -> { includes(:subkeys) }
validates :user, presence: true
 
validates :key,
Loading
Loading
Loading
Loading
@@ -7,6 +7,13 @@
 
.description
%code= key.fingerprint
- if key.subkeys.present?
.subkeys
%span.bold Subkeys:
%ul.subkeys-list
- key.subkeys.each do |subkey|
%li
%code= subkey.fingerprint
.pull-right
%span.key-created-at
created #{time_ago_with_tooltip(key.created_at)}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment