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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
312dc89a
Commit
312dc89a
authored
Jul 13, 2017
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nicer email badges on the profile gpg page
parent
a03a6ff3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
13 deletions
+32
-13
app/assets/stylesheets/pages/profile.scss
app/assets/stylesheets/pages/profile.scss
+23
-0
app/helpers/badges_helper.rb
app/helpers/badges_helper.rb
+0
-11
app/views/profiles/gpg_keys/_email_with_badge.html.haml
app/views/profiles/gpg_keys/_email_with_badge.html.haml
+8
-0
app/views/profiles/gpg_keys/_key.html.haml
app/views/profiles/gpg_keys/_key.html.haml
+1
-2
No files found.
app/assets/stylesheets/pages/profile.scss
View file @
312dc89a
...
...
@@ -391,3 +391,26 @@ table.u2f-registrations {
margin-bottom
:
0
;
}
}
.gpg-email-badge
{
display
:
inline
;
margin-right
:
$gl-padding
/
2
;
.gpg-email-badge-email
{
display
:
inline
;
margin-right
:
$gl-padding
/
4
;
}
.label-verification-status
{
border-width
:
1px
;
border-style
:
solid
;
&
.verified
{
@include
green-status-color
;
}
&
.unverified
{
@include
status-color
(
$gray-dark
,
$gray
,
$common-gray-dark
);
}
}
}
app/helpers/badges_helper.rb
deleted
100644 → 0
View file @
a03a6ff3
module
BadgesHelper
def
verified_email_badge
(
email
,
verified
)
css_classes
=
%w(btn btn-xs disabled)
css_classes
<<
'btn-success'
if
verified
content_tag
'span'
,
class:
css_classes
do
"
#{
email
}
#{
verified
?
'Verified'
:
'Unverified'
}
"
end
end
end
app/views/profiles/gpg_keys/_email_with_badge.html.haml
0 → 100644
View file @
312dc89a
-
css_classes
=
%w(label label-verification-status)
-
css_classes
<<
(
verified
?
'verified'
:
'unverified'
)
-
text
=
verified
?
'Verified'
:
'Unverified'
.gpg-email-badge
.gpg-email-badge-email
=
email
%div
{
class:
css_classes
}
=
text
app/views/profiles/gpg_keys/_key.html.haml
View file @
312dc89a
...
...
@@ -3,8 +3,7 @@
=
icon
'key'
,
class:
"settings-list-icon hidden-xs"
.key-list-item-info
-
key
.
emails_with_verified_status
.
map
do
|
email
,
verified
|
=
email
=
verified_email_badge
(
email
,
verified
)
=
render
partial:
'email_with_badge'
,
locals:
{
email:
email
,
verified:
verified
}
.description
%code
=
key
.
fingerprint
...
...
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