From 7b28218f96d14c9650484a183ffab3b2132b05db Mon Sep 17 00:00:00 2001 From: Senorsen Date: Tue, 14 Apr 2015 00:28:49 +0800 Subject: Allow user to choose which email to be public This commit allows user to show one of their emails in profile page, or don't show email in this page. --- app/views/profiles/show.html.haml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/views/profiles/show.html.haml') diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index 5a501e43149..6c745e69e40 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -41,6 +41,11 @@ - else %span.help-block We also use email for avatar detection if no avatar is uploaded. + .form-group + = f.label :public_email, class: "control-label" + .col-sm-10 + = f.select :public_email, options_for_select(@user.all_emails, selected: @user.public_email), {include_blank: 'Do not show in profile'}, class: "form-control" + %span.help-block This email will be displayed on your public profile. .form-group = f.label :skype, class: "control-label" .col-sm-10= f.text_field :skype, class: "form-control" -- cgit v1.2.1