2018-11-20 20:47:30 +05:30
- breadcrumb_title s_("Profiles|Edit Profile")
2020-07-28 23:09:34 +05:30
- page_title s_("Profiles|Edit Profile")
2017-09-10 17:25:29 +05:30
- @content_class = "limit-container-width" unless fluid_layout
2018-11-20 20:47:30 +05:30
- gravatar_link = link_to Gitlab.config.gravatar.host, 'https://' + Gitlab.config.gravatar.host
2021-01-29 00:20:46 +05:30
- availability = availability_values
2022-08-27 11:52:29 +05:30
- custom_emoji = @user.status&.customized?
2016-08-24 12:49:21 +05:30
2022-08-13 15:12:31 +05:30
= gitlab_ui_form_for @user, url: profile_path, method: :put, html: { multipart: true, class: 'edit-user js-edit-user gl-mt-3 js-quick-submit gl-show-field-errors js-password-prompt-form', remote: true }, authenticity_token: true do |f|
2021-03-11 19:13:27 +05:30
.row.js-search-settings-section
2017-09-10 17:25:29 +05:30
.col-lg-4.profile-settings-sidebar
2020-06-23 00:09:42 +05:30
%h4.gl-mt-0
2021-09-04 01:27:46 +05:30
= s_("Profiles|Public avatar")
2016-06-02 11:05:42 +05:30
%p
- if @user.avatar?
- if gravatar_enabled?
2018-11-20 20:47:30 +05:30
= s_("Profiles|You can change your avatar here or remove the current avatar to revert to %{gravatar_link}").html_safe % { gravatar_link: gravatar_link }
- else
= s_("Profiles|You can change your avatar here")
2016-06-02 11:05:42 +05:30
- else
- if gravatar_enabled?
2018-11-20 20:47:30 +05:30
= s_("Profiles|You can upload your avatar here or change it at %{gravatar_link}").html_safe % { gravatar_link: gravatar_link }
- else
= s_("Profiles|You can upload your avatar here")
2020-05-24 23:13:21 +05:30
- if current_appearance&.profile_image_guidelines?
.md
= brand_profile_image_guidelines
2017-09-10 17:25:29 +05:30
.col-lg-8
2021-09-04 01:27:46 +05:30
.avatar-image
2018-03-27 19:54:05 +05:30
= link_to avatar_icon_for_user(@user, 400), target: '_blank', rel: 'noopener noreferrer' do
2021-09-04 01:27:46 +05:30
= image_tag avatar_icon_for_user(@user, 96), alt: '', class: 'avatar s96'
2020-06-23 00:09:42 +05:30
%h5.gl-mt-0= s_("Profiles|Upload new avatar")
2021-09-04 01:27:46 +05:30
.gl-my-3
%button.gl-button.btn.btn-default.js-choose-user-avatar-button{ type: 'button' }= s_("Profiles|Choose file...")
2021-04-29 21:17:54 +05:30
%span.avatar-file-name.gl-ml-3.js-avatar-filename= s_("Profiles|No file chosen.")
2022-07-16 23:28:13 +05:30
= f.file_field :avatar, class: 'js-user-avatar-input hidden', accept: 'image/*'
2021-09-04 01:27:46 +05:30
.gl-text-gray-500= s_("Profiles|The maximum file size allowed is 200KB.")
2016-06-02 11:05:42 +05:30
- if @user.avatar?
2021-09-04 01:27:46 +05:30
= link_to s_("Profiles|Remove avatar"), profile_avatar_path, data: { confirm: s_("Profiles|Avatar will be removed. Are you sure?") }, method: :delete, class: 'gl-button btn btn-danger-secondary btn-sm gl-mt-5'
2021-03-11 19:13:27 +05:30
.col-lg-12
%hr
.row.js-search-settings-section
2018-11-18 11:00:15 +05:30
.col-lg-4.profile-settings-sidebar
2020-06-23 00:09:42 +05:30
%h4.gl-mt-0= s_("Profiles|Current status")
2018-11-18 11:00:15 +05:30
%p= s_("Profiles|This emoji and message will appear on your profile and throughout the interface.")
.col-lg-8
= f.fields_for :status, @user.status do |status_form|
2022-08-13 15:12:31 +05:30
- emoji_button = render Pajamas::ButtonComponent.new(button_options: { title: s_("Profiles|Add status emoji"),
class: 'js-toggle-emoji-menu emoji-menu-toggle-button has-tooltip' } ) do
2021-01-29 00:20:46 +05:30
- if custom_emoji
2021-04-17 20:07:23 +05:30
= emoji_icon(@user.status.emoji, class: 'gl-mr-0!')
2021-01-29 00:20:46 +05:30
%span#js-no-emoji-placeholder.no-emoji-placeholder{ class: ('hidden' if custom_emoji) }
2019-09-04 21:01:54 +05:30
= sprite_icon('slight-smile', css_class: 'award-control-icon-neutral')
= sprite_icon('smiley', css_class: 'award-control-icon-positive')
= sprite_icon('smile', css_class: 'award-control-icon-super-positive')
2022-08-13 15:12:31 +05:30
- reset_message_button = render Pajamas::ButtonComponent.new(icon: 'close',
button_options: { id: 'js-clear-user-status-button',
class: 'has-tooltip',
title: s_("Profiles|Clear status") } )
2018-11-18 11:00:15 +05:30
= status_form.hidden_field :emoji, id: 'js-status-emoji-field'
2022-07-16 23:28:13 +05:30
.form-group.gl-form-group
= status_form.label :message, s_("Profiles|Your status")
.input-group{ role: 'group' }
.input-group-prepend
= emoji_button
= status_form.text_field :message,
id: 'js-status-message-field',
class: 'form-control gl-form-input input-lg',
placeholder: s_("Profiles|What's your status?")
.input-group-append
= reset_message_button
.form-group.gl-form-group
= status_form.gitlab_ui_checkbox_component :availability,
s_("Profiles|Busy"),
2022-08-13 15:12:31 +05:30
help_text: s_('Profiles|An indicator appears next to your name and avatar.'),
2022-07-16 23:28:13 +05:30
checkbox_options: { data: { testid: "user-availability-checkbox" } },
checked_value: availability["busy"],
unchecked_value: availability["not_set"]
2021-09-30 23:02:18 +05:30
.col-lg-12
%hr
2021-03-11 19:13:27 +05:30
.row.user-time-preferences.js-search-settings-section
.col-lg-4.profile-settings-sidebar
%h4.gl-mt-0= s_("Profiles|Time settings")
2022-08-13 15:12:31 +05:30
%p= s_("Profiles|Set your local time zone.")
2021-03-11 19:13:27 +05:30
.col-lg-8
2021-04-29 21:17:54 +05:30
%h5= _("Time zone")
2021-11-18 22:05:49 +05:30
= dropdown_tag(_("Select a time zone"), options: { toggle_class: 'gl-button btn js-timezone-dropdown input-lg gl-w-full!', title: _("Select a time zone"), filter: true, placeholder: s_("OfSearchInADropdown|Filter"), data: { data: timezone_data } } )
2021-03-11 19:13:27 +05:30
%input.hidden{ :type => 'hidden', :id => 'user_timezone', :name => 'user[timezone]', value: @user.timezone }
.col-lg-12
%hr
.row.js-search-settings-section
2017-09-10 17:25:29 +05:30
.col-lg-4.profile-settings-sidebar
2020-06-23 00:09:42 +05:30
%h4.gl-mt-0
2018-11-20 20:47:30 +05:30
= s_("Profiles|Main settings")
2016-06-02 11:05:42 +05:30
%p
2022-08-13 15:12:31 +05:30
= s_("Profiles|This information will appear on your profile.")
2016-06-02 11:05:42 +05:30
- if current_user.ldap_user?
2018-11-20 20:47:30 +05:30
= s_("Profiles|Some options are unavailable for LDAP accounts")
2017-09-10 17:25:29 +05:30
.col-lg-8
.row
2022-07-16 23:28:13 +05:30
.form-group.gl-form-group.col-md-9.rspec-full-name
= render 'profiles/name', form: f, user: @user
.form-group.gl-form-group.col-md-3
= f.label :id, s_('Profiles|User ID')
= f.text_field :id, class: 'gl-form-input form-control', readonly: true
.form-group.gl-form-group
= f.label :pronouns, s_('Profiles|Pronouns')
2022-07-23 23:45:48 +05:30
= f.text_field :pronouns, class: 'gl-form-input form-control gl-md-form-input-lg'
2022-07-16 23:28:13 +05:30
%small.form-text.text-gl-muted
2022-08-13 15:12:31 +05:30
= s_("Profiles|Enter your pronouns to let people know how to refer to you.")
2022-07-16 23:28:13 +05:30
.form-group.gl-form-group
= f.label :pronunciation, s_('Profiles|Pronunciation')
2022-07-23 23:45:48 +05:30
= f.text_field :pronunciation, class: 'gl-form-input form-control gl-md-form-input-lg'
2022-07-16 23:28:13 +05:30
%small.form-text.text-gl-muted
2022-08-13 15:12:31 +05:30
= s_("Profiles|Enter how your name is pronounced to help people address you correctly.")
2021-11-11 11:23:49 +05:30
= render_if_exists 'profiles/extra_settings', form: f
2019-07-07 11:18:12 +05:30
= render_if_exists 'profiles/email_settings', form: f
2022-07-16 23:28:13 +05:30
.form-group.gl-form-group
= f.label :skype
2022-07-23 23:45:48 +05:30
= f.text_field :skype, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|username")
2022-07-16 23:28:13 +05:30
.form-group.gl-form-group
= f.label :linkedin
2022-07-23 23:45:48 +05:30
= f.text_field :linkedin, class: 'gl-form-input form-control gl-md-form-input-lg'
2022-07-16 23:28:13 +05:30
%small.form-text.text-gl-muted
= s_("Profiles|Your LinkedIn profile name from linkedin.com/in/profilename")
.form-group.gl-form-group
= f.label :twitter
2022-07-23 23:45:48 +05:30
= f.text_field :twitter, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|@username")
2022-07-16 23:28:13 +05:30
.form-group.gl-form-group
= f.label :website_url, s_('Profiles|Website url')
2022-07-23 23:45:48 +05:30
= f.text_field :website_url, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|https://website.com")
2022-07-16 23:28:13 +05:30
.form-group.gl-form-group
= f.label :location, s_('Profiles|Location')
- if @user.read_only_attribute?(:location)
2022-07-23 23:45:48 +05:30
= f.text_field :location, class: 'gl-form-input form-control gl-md-form-input-lg', readonly: true
2022-07-16 23:28:13 +05:30
%small.form-text.text-gl-muted
= s_("Profiles|Your location was automatically set based on your %{provider_label} account") % { provider_label: attribute_provider_label(:location) }
- else
2022-07-23 23:45:48 +05:30
= f.text_field :location, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|City, country")
2022-07-16 23:28:13 +05:30
.form-group.gl-form-group
= f.label :job_title, s_('Profiles|Job title')
2022-07-23 23:45:48 +05:30
= f.text_field :job_title, class: 'gl-form-input form-control gl-md-form-input-lg'
2022-07-16 23:28:13 +05:30
.form-group.gl-form-group
= f.label :organization, s_('Profiles|Organization')
2022-07-23 23:45:48 +05:30
= f.text_field :organization, class: 'gl-form-input form-control gl-md-form-input-lg'
2022-07-16 23:28:13 +05:30
%small.form-text.text-gl-muted
2022-08-13 15:12:31 +05:30
= s_("Profiles|Who you represent or work for.")
2022-07-16 23:28:13 +05:30
.form-group.gl-form-group
= f.label :bio, s_('Profiles|Bio')
= f.text_area :bio, class: 'gl-form-input gl-form-textarea form-control', rows: 4, maxlength: 250
%small.form-text.text-gl-muted
2022-08-13 15:12:31 +05:30
= s_("Profiles|Tell us about yourself in fewer than 250 characters.")
2018-11-18 11:00:15 +05:30
%hr
2022-07-16 23:28:13 +05:30
%fieldset.form-group.gl-form-group
%legend.col-form-label.col-form-label
= _('Private profile')
2022-08-13 15:12:31 +05:30
- private_profile_label = s_("Profiles|Don't display activity-related personal information on your profile.")
2022-07-16 23:28:13 +05:30
- private_profile_help_link = link_to sprite_icon('question-o'), help_page_path('user/profile/index.md', anchor: 'make-your-user-profile-page-private')
= f.gitlab_ui_checkbox_component :private_profile, '%{private_profile_label} %{private_profile_help_link}'.html_safe % { private_profile_label: private_profile_label, private_profile_help_link: private_profile_help_link.html_safe }
%fieldset.form-group.gl-form-group
%legend.col-form-label.col-form-label
= s_("Profiles|Private contributions")
= f.gitlab_ui_checkbox_component :include_private_contributions,
s_('Profiles|Include private contributions on my profile'),
2022-08-13 15:12:31 +05:30
help_text: s_("Profiles|Choose to show contributions of private projects on your public profile without any project, repository or organization information.")
2021-10-27 15:23:28 +05:30
%hr
2021-11-18 22:05:49 +05:30
= f.submit s_("Profiles|Update profile settings"), class: 'gl-button btn btn-confirm gl-mr-3 js-password-prompt-btn'
2021-10-27 15:23:28 +05:30
= link_to _("Cancel"), user_path(current_user), class: 'gl-button btn btn-default btn-cancel'
2014-09-02 18:07:02 +05:30
2021-11-18 22:05:49 +05:30
#password-prompt-modal
2021-01-03 14:25:43 +05:30
.modal.modal-profile-crop{ data: { cropper_css_path: ActionController::Base.helpers.stylesheet_path('lazy_bundles/cropper.css') } }
2016-06-02 11:05:42 +05:30
.modal-dialog
.modal-content
.modal-header
%h4.modal-title
2018-11-20 20:47:30 +05:30
= s_("Profiles|Position and size your new avatar")
%button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _("Close") }
2021-09-04 01:27:46 +05:30
%span{ "aria-hidden": "true" } ×
2016-06-02 11:05:42 +05:30
.modal-body
.profile-crop-image-container
2018-11-20 20:47:30 +05:30
%img.modal-profile-crop-image{ alt: s_("Profiles|Avatar cropper") }
2016-06-02 11:05:42 +05:30
.crop-controls
.btn-group
2022-03-02 08:16:31 +05:30
%button.btn.gl-button.btn-default{ data: { method: 'zoom', option: '-0.1' } }
2020-11-24 15:15:51 +05:30
%span
= sprite_icon('search-minus')
2022-03-02 08:16:31 +05:30
%button.btn.gl-button.btn-default{ data: { method: 'zoom', option: '0.1' } }
2020-11-24 15:15:51 +05:30
%span
= sprite_icon('search-plus')
2016-06-02 11:05:42 +05:30
.modal-footer
2021-03-11 19:13:27 +05:30
%button.btn.gl-button.btn-confirm.js-upload-user-avatar{ type: 'button' }
2018-11-20 20:47:30 +05:30
= s_("Profiles|Set new profile picture")