2017-09-10 17:25:29 +05:30
|
|
|
- breadcrumb_title "Profile"
|
|
|
|
- @content_class = "limit-container-width" unless fluid_layout
|
2016-08-24 12:49:21 +05:30
|
|
|
= render 'profiles/head'
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
= bootstrap_form_for @user, url: profile_path, method: :put, html: { multipart: true, class: 'edit-user prepend-top-default' }, authenticity_token: true do |f|
|
2016-06-02 11:05:42 +05:30
|
|
|
= form_errors(@user)
|
2014-09-02 18:07:02 +05:30
|
|
|
|
|
|
|
.row
|
2017-09-10 17:25:29 +05:30
|
|
|
.col-lg-4.profile-settings-sidebar
|
2016-06-02 11:05:42 +05:30
|
|
|
%h4.prepend-top-0
|
|
|
|
Public Avatar
|
|
|
|
%p
|
|
|
|
- if @user.avatar?
|
|
|
|
You can change your avatar here
|
|
|
|
- if gravatar_enabled?
|
2017-09-10 17:25:29 +05:30
|
|
|
or remove the current avatar to revert to #{link_to Gitlab.config.gravatar.host, 'http://' + Gitlab.config.gravatar.host}
|
2016-06-02 11:05:42 +05:30
|
|
|
- else
|
|
|
|
You can upload an avatar here
|
|
|
|
- if gravatar_enabled?
|
2017-09-10 17:25:29 +05:30
|
|
|
or change it at #{link_to Gitlab.config.gravatar.host, 'http://' + Gitlab.config.gravatar.host}
|
|
|
|
.col-lg-8
|
2016-06-02 11:05:42 +05:30
|
|
|
.clearfix.avatar-image.append-bottom-default
|
2017-08-17 22:00:37 +05:30
|
|
|
= link_to avatar_icon(@user, 400), target: '_blank', rel: 'noopener noreferrer' do
|
|
|
|
= image_tag avatar_icon(@user, 160), alt: '', class: 'avatar s160'
|
2016-06-02 11:05:42 +05:30
|
|
|
%h5.prepend-top-0
|
|
|
|
Upload new avatar
|
|
|
|
.prepend-top-5.append-bottom-10
|
|
|
|
%a.btn.js-choose-user-avatar-button
|
|
|
|
Browse file...
|
|
|
|
%span.avatar-file-name.prepend-left-default.js-avatar-filename No file chosen
|
2017-09-10 17:25:29 +05:30
|
|
|
= f.file_field_without_bootstrap :avatar, class: 'js-user-avatar-input hidden', accept: 'image/*'
|
2016-06-02 11:05:42 +05:30
|
|
|
.help-block
|
|
|
|
The maximum file size allowed is 200KB.
|
|
|
|
- if @user.avatar?
|
|
|
|
%hr
|
2017-09-10 17:25:29 +05:30
|
|
|
= link_to 'Remove avatar', profile_avatar_path, data: { confirm: 'Avatar will be removed. Are you sure?' }, method: :delete, class: 'btn btn-gray'
|
2016-06-02 11:05:42 +05:30
|
|
|
%hr
|
|
|
|
.row
|
2017-09-10 17:25:29 +05:30
|
|
|
.col-lg-4.profile-settings-sidebar
|
2016-06-02 11:05:42 +05:30
|
|
|
%h4.prepend-top-0
|
|
|
|
Main settings
|
|
|
|
%p
|
|
|
|
This information will appear on your profile.
|
|
|
|
- if current_user.ldap_user?
|
|
|
|
Some options are unavailable for LDAP accounts
|
2017-09-10 17:25:29 +05:30
|
|
|
.col-lg-8
|
|
|
|
.row
|
|
|
|
= f.text_field :name, required: true, wrapper: { class: 'col-md-9' },
|
|
|
|
help: 'Enter your name, so people you know can recognize you.'
|
|
|
|
= f.text_field :id, readonly: true, label: 'User ID', wrapper: { class: 'col-md-3' }
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
- if @user.external_email?
|
|
|
|
= f.text_field :email, required: true, readonly: true, help: "Your email address was automatically set based on your #{email_provider_label} account."
|
|
|
|
- else
|
|
|
|
= f.text_field :email, required: true, value: (@user.email unless @user.temp_oauth_email?),
|
|
|
|
help: user_email_help_text(@user)
|
|
|
|
= f.select :public_email, options_for_select(@user.all_emails, selected: @user.public_email),
|
|
|
|
{ help: 'This email will be displayed on your public profile.', include_blank: 'Do not show on profile' },
|
|
|
|
control_class: 'select2'
|
|
|
|
= f.select :preferred_language, Gitlab::I18n::AVAILABLE_LANGUAGES.map { |value, label| [label, value] },
|
|
|
|
{ help: 'This feature is experimental and translations are not complete yet.' },
|
|
|
|
control_class: 'select2'
|
|
|
|
= f.text_field :skype
|
|
|
|
= f.text_field :linkedin
|
|
|
|
= f.text_field :twitter
|
|
|
|
= f.text_field :website_url, label: 'Website'
|
|
|
|
= f.text_field :location
|
|
|
|
= f.text_field :organization
|
|
|
|
= f.text_area :bio, rows: 4, maxlength: 250, help: 'Tell us about yourself in fewer than 250 characters.'
|
2016-06-02 11:05:42 +05:30
|
|
|
.prepend-top-default.append-bottom-default
|
2017-09-10 17:25:29 +05:30
|
|
|
= f.submit 'Update profile settings', class: 'btn btn-success'
|
|
|
|
= link_to 'Cancel', user_path(current_user), class: 'btn btn-cancel'
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2016-06-02 11:05:42 +05:30
|
|
|
.modal.modal-profile-crop
|
|
|
|
.modal-dialog
|
|
|
|
.modal-content
|
|
|
|
.modal-header
|
2017-09-10 17:25:29 +05:30
|
|
|
%button.close{ type: 'button', 'data-dismiss': 'modal' }
|
2016-06-02 11:05:42 +05:30
|
|
|
%span
|
|
|
|
×
|
|
|
|
%h4.modal-title
|
|
|
|
Position and size your new avatar
|
|
|
|
.modal-body
|
|
|
|
.profile-crop-image-container
|
2017-09-10 17:25:29 +05:30
|
|
|
%img.modal-profile-crop-image{ alt: 'Avatar cropper' }
|
2016-06-02 11:05:42 +05:30
|
|
|
.crop-controls
|
|
|
|
.btn-group
|
2017-09-10 17:25:29 +05:30
|
|
|
%button.btn.btn-primary{ data: { method: 'zoom', option: '0.1' } }
|
2016-06-02 11:05:42 +05:30
|
|
|
%span.fa.fa-search-plus
|
2017-09-10 17:25:29 +05:30
|
|
|
%button.btn.btn-primary{ data: { method: 'zoom', option: '-0.1' } }
|
2016-06-02 11:05:42 +05:30
|
|
|
%span.fa.fa-search-minus
|
|
|
|
.modal-footer
|
2017-09-10 17:25:29 +05:30
|
|
|
%button.btn.btn-primary.js-upload-user-avatar{ type: 'button' }
|
2016-06-02 11:05:42 +05:30
|
|
|
Set new profile picture
|