Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-07-13 17:52:34 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 16:45:26 +0300
commit312dc89a44642050a2224c1b780054828c819fd6 (patch)
tree95a70aa6d534dd2b0e42b14935d4dbe3efd6113b /app/views/profiles/gpg_keys
parenta03a6ff326300daafbd67fd32eaaa08a4b649395 (diff)
nicer email badges on the profile gpg page
Diffstat (limited to 'app/views/profiles/gpg_keys')
-rw-r--r--app/views/profiles/gpg_keys/_email_with_badge.html.haml8
-rw-r--r--app/views/profiles/gpg_keys/_key.html.haml3
2 files changed, 9 insertions, 2 deletions
diff --git a/app/views/profiles/gpg_keys/_email_with_badge.html.haml b/app/views/profiles/gpg_keys/_email_with_badge.html.haml
new file mode 100644
index 00000000000..5f7844584e1
--- /dev/null
+++ b/app/views/profiles/gpg_keys/_email_with_badge.html.haml
@@ -0,0 +1,8 @@
+- 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
diff --git a/app/views/profiles/gpg_keys/_key.html.haml b/app/views/profiles/gpg_keys/_key.html.haml
index 86e2510d22f..b04981f90e3 100644
--- a/app/views/profiles/gpg_keys/_key.html.haml
+++ b/app/views/profiles/gpg_keys/_key.html.haml
@@ -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