2013-07-13 01:45:48 -04:00
|
|
|
%h3.page-title
|
2013-10-09 05:30:49 -04:00
|
|
|
Profile settings
|
|
|
|
%p.light
|
|
|
|
This information appears on your profile.
|
|
|
|
- if current_user.ldap_user?
|
|
|
|
Some options are unavailable for LDAP accounts
|
2012-01-29 16:59:12 -05:00
|
|
|
%hr
|
2011-10-19 18:34:05 -04:00
|
|
|
|
2013-10-09 05:30:49 -04:00
|
|
|
|
|
|
|
|
2013-12-12 12:05:21 -05: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 18:46:32 -05:00
|
|
|
-if @user.errors.any?
|
2013-12-31 09:34:14 -05:00
|
|
|
%div.alert.alert-danger
|
2012-01-26 18:46:32 -05:00
|
|
|
%ul
|
|
|
|
- @user.errors.full_messages.each do |msg|
|
|
|
|
%li= msg
|
2012-03-23 19:01:36 -04:00
|
|
|
.row
|
2013-12-30 16:55:15 -05:00
|
|
|
.col-md-7
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2012-08-10 18:07:50 -04:00
|
|
|
= f.label :name, class: "control-label"
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2013-12-30 19:50:36 -05:00
|
|
|
= f.text_field :name, class: "form-control", required: true
|
2012-04-19 07:01:58 -04:00
|
|
|
%span.help-block Enter your name, so people you know can recognize you.
|
2013-11-27 03:32:37 -05:00
|
|
|
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2012-08-10 18:07:50 -04:00
|
|
|
= f.label :email, class: "control-label"
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2013-11-27 03:32:37 -05:00
|
|
|
- if @user.ldap_user?
|
2013-12-30 19:50:36 -05:00
|
|
|
= f.text_field :email, class: "form-control", required: true, readonly: true
|
2013-11-27 03:32:37 -05:00
|
|
|
%span.help-block.light
|
|
|
|
Email is read-only for LDAP user
|
2013-10-15 04:19:19 -04:00
|
|
|
- else
|
2014-04-07 07:09:29 -04: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 03:32:37 -05:00
|
|
|
- if @user.unconfirmed_email.present?
|
|
|
|
%span.help-block
|
2014-04-07 08:14:14 -04:00
|
|
|
Please click the link in the confirmation email before continuing, it was send to
|
2013-11-27 03:32:37 -05:00
|
|
|
%strong #{@user.unconfirmed_email}
|
2014-04-07 08:14:14 -04:00
|
|
|
|
2013-11-27 03:32:37 -05:00
|
|
|
- else
|
|
|
|
%span.help-block We also use email for avatar detection if no avatar is uploaded.
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2013-01-25 09:36:14 -05:00
|
|
|
= f.label :skype, class: "control-label"
|
2013-12-30 19:50:36 -05:00
|
|
|
.col-sm-10= f.text_field :skype, class: "form-control"
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2013-01-25 09:36:14 -05:00
|
|
|
= f.label :linkedin, class: "control-label"
|
2013-12-30 19:50:36 -05:00
|
|
|
.col-sm-10= f.text_field :linkedin, class: "form-control"
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2013-01-25 09:36:14 -05:00
|
|
|
= f.label :twitter, class: "control-label"
|
2013-12-30 19:50:36 -05:00
|
|
|
.col-sm-10= f.text_field :twitter, class: "form-control"
|
2014-01-18 14:07:00 -05:00
|
|
|
.form-group
|
2014-01-20 08:05:19 -05:00
|
|
|
= f.label :website_url, 'Website', class: "control-label"
|
2014-01-18 14:07:00 -05:00
|
|
|
.col-sm-10= f.text_field :website_url, class: "form-control"
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2013-10-09 05:30:49 -04:00
|
|
|
= f.label :bio, class: "control-label"
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2013-12-30 19:50:36 -05:00
|
|
|
= f.text_area :bio, rows: 6, class: "form-control", maxlength: 250
|
2013-10-09 05:30:49 -04:00
|
|
|
%span.help-block Tell us about yourself in fewer than 250 characters.
|
|
|
|
|
2013-12-31 09:16:50 -05:00
|
|
|
.col-md-5
|
2013-10-09 05:30:49 -04:00
|
|
|
.light-well
|
|
|
|
= image_tag avatar_icon(@user.email, 160), alt: '', class: 'avatar s160'
|
|
|
|
|
|
|
|
.clearfix
|
2013-10-06 14:13:56 -04:00
|
|
|
.profile-avatar-form-option
|
2013-10-09 05:30:49 -04:00
|
|
|
%p.light
|
2013-12-02 13:03:07 -05:00
|
|
|
- if @user.avatar?
|
|
|
|
You can change your avatar here
|
|
|
|
%br
|
|
|
|
or remove the current avatar to revert to #{link_to "gravatar.com", "http://gravatar.com"}
|
|
|
|
- else
|
|
|
|
You can upload an avatar here
|
|
|
|
%br
|
|
|
|
or change it at #{link_to "gravatar.com", "http://gravatar.com"}
|
2013-10-09 05:30:49 -04:00
|
|
|
%hr
|
2013-10-06 14:13:56 -04:00
|
|
|
%a.choose-btn.btn.btn-small.js-choose-user-avatar-button
|
|
|
|
%i.icon-paper-clip
|
|
|
|
%span Choose File ...
|
|
|
|
|
|
|
|
%span.file_name.js-avatar-filename File name...
|
2014-01-02 06:32:27 -05:00
|
|
|
= f.file_field :avatar, class: "js-user-avatar-input hidden"
|
2013-12-05 04:26:55 -05:00
|
|
|
.light The maximum file size allowed is 100KB.
|
|
|
|
- if @user.avatar?
|
|
|
|
%hr
|
2013-12-10 14:33:21 -05:00
|
|
|
= link_to 'Remove avatar', profile_avatar_path, data: { confirm: "Avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-small remove-avatar"
|
2012-04-24 14:49:34 -04:00
|
|
|
|
2012-04-10 01:51:08 -04:00
|
|
|
.form-actions
|
2013-12-05 04:26:55 -05:00
|
|
|
= f.submit 'Save changes', class: "btn btn-save"
|