2015-09-09 21:05:47 +00:00
.gray-content-block.top-block
2015-02-23 18:40:06 +00:00
This information will appear on your profile.
2013-10-09 09:30:49 +00:00
- if current_user.ldap_user?
Some options are unavailable for LDAP accounts
2015-09-09 21:05:47 +00:00
.prepend-top-default
2013-12-12 17:05:21 +00:00
= form_for @user, url: profile_path, method: :put, html: { multipart: true, class: "edit_user form-horizontal" }, authenticity_token: true do |f|
2012-01-26 23:46:32 +00:00
-if @user.errors.any?
2013-12-31 14:34:14 +00:00
%div.alert.alert-danger
2012-01-26 23:46:32 +00:00
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
2012-03-23 23:01:36 +00:00
.row
2013-12-30 21:55:15 +00:00
.col-md-7
2013-12-30 23:27:02 +00:00
.form-group
2012-08-10 22:07:50 +00:00
= f.label :name, class: "control-label"
2013-12-30 23:27:02 +00:00
.col-sm-10
2013-12-31 00:50:36 +00:00
= f.text_field :name, class: "form-control", required: true
2012-04-19 11:01:58 +00:00
%span.help-block Enter your name, so people you know can recognize you.
2013-11-27 08:32:37 +00:00
2013-12-30 23:27:02 +00:00
.form-group
2012-08-10 22:07:50 +00:00
= f.label :email, class: "control-label"
2013-12-30 23:27:02 +00:00
.col-sm-10
2013-11-27 08:32:37 +00:00
- if @user.ldap_user?
2013-12-31 00:50:36 +00:00
= f.text_field :email, class: "form-control", required: true, readonly: true
2013-11-27 08:32:37 +00:00
%span.help-block.light
Email is read-only for LDAP user
2013-10-15 08:19:19 +00:00
- else
2014-04-07 11:09:29 +00:00
- if @user.temp_oauth_email?
= f.text_field :email, class: "form-control", required: true, value: nil
- else
= f.text_field :email, class: "form-control", required: true
2013-11-27 08:32:37 +00:00
- if @user.unconfirmed_email.present?
%span.help-block
2015-05-10 14:44:58 +00:00
Please click the link in the confirmation email before continuing. It was sent to
= succeed "." do
%strong #{@user.unconfirmed_email}
%p
= link_to "Resend confirmation e-mail", user_confirmation_path(user: { email: @user.unconfirmed_email }), method: :post
2014-04-07 12:14:14 +00:00
2013-11-27 08:32:37 +00:00
- else
%span.help-block We also use email for avatar detection if no avatar is uploaded.
2015-04-13 16:28:49 +00:00
.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.
2013-12-30 23:27:02 +00:00
.form-group
2013-01-25 14:36:14 +00:00
= f.label :skype, class: "control-label"
2013-12-31 00:50:36 +00:00
.col-sm-10= f.text_field :skype, class: "form-control"
2013-12-30 23:27:02 +00:00
.form-group
2013-01-25 14:36:14 +00:00
= f.label :linkedin, class: "control-label"
2013-12-31 00:50:36 +00:00
.col-sm-10= f.text_field :linkedin, class: "form-control"
2013-12-30 23:27:02 +00:00
.form-group
2013-01-25 14:36:14 +00:00
= f.label :twitter, class: "control-label"
2013-12-31 00:50:36 +00:00
.col-sm-10= f.text_field :twitter, class: "form-control"
2014-01-18 19:07:00 +00:00
.form-group
2014-01-20 13:05:19 +00:00
= f.label :website_url, 'Website', class: "control-label"
2014-01-18 19:07:00 +00:00
.col-sm-10= f.text_field :website_url, class: "form-control"
2015-03-20 23:52:23 +00:00
.form-group
= f.label :location, 'Location', class: "control-label"
.col-sm-10= f.text_field :location, class: "form-control"
2013-12-30 23:27:02 +00:00
.form-group
2013-10-09 09:30:49 +00:00
= f.label :bio, class: "control-label"
2013-12-30 23:27:02 +00:00
.col-sm-10
2015-03-07 18:35:17 +00:00
= f.text_area :bio, rows: 4, class: "form-control", maxlength: 250
2013-10-09 09:30:49 +00:00
%span.help-block Tell us about yourself in fewer than 250 characters.
2013-12-31 14:16:50 +00:00
.col-md-5
2013-10-09 09:30:49 +00:00
.light-well
= image_tag avatar_icon(@user.email, 160), alt: '', class: 'avatar s160'
.clearfix
2013-10-06 18:13:56 +00:00
.profile-avatar-form-option
2013-10-09 09:30:49 +00:00
%p.light
2013-12-02 18:03:07 +00:00
- if @user.avatar?
You can change your avatar here
2014-06-24 14:57:34 +00:00
- if Gitlab.config.gravatar.enabled
%br
2015-08-05 07:48:16 +00:00
or remove the current avatar to revert to #{link_to Gitlab.config.gravatar.host, "http://" + Gitlab.config.gravatar.host}
2013-12-02 18:03:07 +00:00
- else
You can upload an avatar here
2014-06-24 14:57:34 +00:00
- if Gitlab.config.gravatar.enabled
%br
2015-08-05 07:48:16 +00:00
or change it at #{link_to Gitlab.config.gravatar.host, "http://" + Gitlab.config.gravatar.host}
2013-10-09 09:30:49 +00:00
%hr
2015-03-14 07:29:32 +00:00
%a.choose-btn.btn.btn-sm.js-choose-user-avatar-button
2014-10-01 22:21:29 +00:00
%i.fa.fa-paperclip
2013-10-06 18:13:56 +00:00
%span Choose File ...
%span.file_name.js-avatar-filename File name...
2014-01-02 11:32:27 +00:00
= f.file_field :avatar, class: "js-user-avatar-input hidden"
2014-12-02 09:32:24 +00:00
.light The maximum file size allowed is 200KB.
2013-12-05 09:26:55 +00:00
- if @user.avatar?
%hr
2015-03-14 07:29:32 +00:00
= link_to 'Remove avatar', profile_avatar_path, data: { confirm: "Avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-sm remove-avatar"
2012-04-24 18:49:34 +00:00
2014-06-07 12:18:01 +00:00
2015-03-07 18:35:17 +00:00
.row
.col-md-7
2015-03-17 07:06:25 +00:00
.form-group
2015-06-15 22:48:54 +00:00
.col-sm-offset-2.col-sm-10
2015-03-17 07:06:25 +00:00
= f.submit 'Save changes', class: "btn btn-success"