Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
c73748e3
Commit
c73748e3
authored
Sep 27, 2017
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Render GPG subkeys on index page
parent
9b4990a4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
1 deletion
+19
-1
app/assets/stylesheets/pages/profile.scss
app/assets/stylesheets/pages/profile.scss
+9
-0
app/controllers/profiles/gpg_keys_controller.rb
app/controllers/profiles/gpg_keys_controller.rb
+1
-1
app/models/gpg_key.rb
app/models/gpg_key.rb
+2
-0
app/views/profiles/gpg_keys/_key.html.haml
app/views/profiles/gpg_keys/_key.html.haml
+7
-0
No files found.
app/assets/stylesheets/pages/profile.scss
View file @
c73748e3
...
...
@@ -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
)
{
...
...
app/controllers/profiles/gpg_keys_controller.rb
View file @
c73748e3
...
...
@@ -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
...
...
app/models/gpg_key.rb
View file @
c73748e3
...
...
@@ -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
,
...
...
app/views/profiles/gpg_keys/_key.html.haml
View file @
c73748e3
...
...
@@ -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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment