summaryrefslogtreecommitdiff
path: root/app/views/profiles/emails
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-03 11:00:51 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-03 11:00:51 +0000
commit4291e28af72890ee4f9c0f306ba691ba84c3435d (patch)
tree980036c1fb0affa984da0c8135d0ffca115baa7c /app/views/profiles/emails
parent0df317f7297b9a72e888edc09aed51f83414f92a (diff)
parentd386bb780864f4fc36490e19ea654f31bf193d0f (diff)
downloadgitlab-ce-4291e28af72890ee4f9c0f306ba691ba84c3435d.tar.gz
Merge branch 'change-primary-email' into 'master'
Allow primary email to be set to an email that you've already added. Fixes gitlab-com/support-forum#106. When the user sets their primary email to an email that they've already added to their account, this patch makes sure that secondary email record is destroyed, and a new email record is created for the old primary email. This is based on the assumption that in this case no email was meant to be deleted, but the user simply wanted to change which of their emails is primary. See merge request !591
Diffstat (limited to 'app/views/profiles/emails')
-rw-r--r--app/views/profiles/emails/index.html.haml16
1 files changed, 12 insertions, 4 deletions
diff --git a/app/views/profiles/emails/index.html.haml b/app/views/profiles/emails/index.html.haml
index c17e01425d8..2c0d0e10a4c 100644
--- a/app/views/profiles/emails/index.html.haml
+++ b/app/views/profiles/emails/index.html.haml
@@ -5,11 +5,15 @@
Your
%b Primary Email
will be used for avatar detection and web based operations, such as edits and merges.
- %br
+%p.light
Your
%b Notification Email
will be used for account notifications.
- %br
+%p.light
+ Your
+ %b Public Email
+ will be displayed on your public profile.
+%p.light
All email addresses will be used to identify your commits.
%hr
@@ -21,13 +25,17 @@
%li
%strong= @primary
%span.label.label-success Primary Email
- - if @primary === @public_email
+ - if @primary === current_user.public_email
%span.label.label-info Public Email
+ - if @primary === current_user.notification_email
+ %span.label.label-info Notification Email
- @emails.each do |email|
%li
%strong= email.email
- - if email.email === @public_email
+ - if email.email === current_user.public_email
%span.label.label-info Public Email
+ - if email.email === current_user.notification_email
+ %span.label.label-info Notification Email
%span.cgray
added #{time_ago_with_tooltip(email.created_at)}
= link_to 'Remove', profile_email_path(email), data: { confirm: 'Are you sure?'}, method: :delete, class: 'btn btn-sm btn-remove pull-right'