debian-mirror-gitlab/app/views/profiles/show.html.haml

102 lines
4.5 KiB
Text
Raw Normal View History

2015-09-25 12:07:36 +05:30
.gray-content-block.top-block
2015-04-26 12:48:37 +05:30
This information will appear on your profile.
2014-09-02 18:07:02 +05:30
- if current_user.ldap_user?
Some options are unavailable for LDAP accounts
2015-09-25 12:07:36 +05:30
.prepend-top-default
2014-09-02 18:07:02 +05:30
= form_for @user, url: profile_path, method: :put, html: { multipart: true, class: "edit_user form-horizontal" }, authenticity_token: true do |f|
-if @user.errors.any?
%div.alert.alert-danger
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
.row
.col-md-7
.form-group
= f.label :name, class: "control-label"
.col-sm-10
= f.text_field :name, class: "form-control", required: true
%span.help-block Enter your name, so people you know can recognize you.
.form-group
= f.label :email, class: "control-label"
.col-sm-10
2016-01-29 22:53:50 +05:30
- if @user.ldap_user? && @user.ldap_email?
2014-09-02 18:07:02 +05:30
= f.text_field :email, class: "form-control", required: true, readonly: true
%span.help-block.light
2016-01-29 22:53:50 +05:30
Your email address was automatically set based on the LDAP server.
2014-09-02 18:07:02 +05:30
- else
- 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
- if @user.unconfirmed_email.present?
%span.help-block
2015-09-11 14:41:01 +05:30
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-09-02 18:07:02 +05:30
- else
%span.help-block We also use email for avatar detection if no avatar is uploaded.
2015-04-26 12:48:37 +05:30
.form-group
= f.label :public_email, class: "control-label"
.col-sm-10
2015-12-23 02:04:40 +05:30
= f.select :public_email, options_for_select(@user.all_emails, selected: @user.public_email), {include_blank: 'Do not show on profile'}, class: "select2"
2015-04-26 12:48:37 +05:30
%span.help-block This email will be displayed on your public profile.
2014-09-02 18:07:02 +05:30
.form-group
= f.label :skype, class: "control-label"
.col-sm-10= f.text_field :skype, class: "form-control"
.form-group
= f.label :linkedin, class: "control-label"
.col-sm-10= f.text_field :linkedin, class: "form-control"
.form-group
= f.label :twitter, class: "control-label"
.col-sm-10= f.text_field :twitter, class: "form-control"
.form-group
= f.label :website_url, 'Website', class: "control-label"
.col-sm-10= f.text_field :website_url, class: "form-control"
2015-04-26 12:48:37 +05:30
.form-group
= f.label :location, 'Location', class: "control-label"
.col-sm-10= f.text_field :location, class: "form-control"
2014-09-02 18:07:02 +05:30
.form-group
= f.label :bio, class: "control-label"
.col-sm-10
2015-04-26 12:48:37 +05:30
= f.text_area :bio, rows: 4, class: "form-control", maxlength: 250
2014-09-02 18:07:02 +05:30
%span.help-block Tell us about yourself in fewer than 250 characters.
.col-md-5
.light-well
2015-10-24 18:46:33 +05:30
= image_tag avatar_icon(@user, 160), alt: '', class: 'avatar s160'
2014-09-02 18:07:02 +05:30
.clearfix
.profile-avatar-form-option
%p.light
- if @user.avatar?
You can change your avatar here
- if Gitlab.config.gravatar.enabled
%br
2015-09-11 14:41:01 +05:30
or remove the current avatar to revert to #{link_to Gitlab.config.gravatar.host, "http://" + Gitlab.config.gravatar.host}
2014-09-02 18:07:02 +05:30
- else
You can upload an avatar here
- if Gitlab.config.gravatar.enabled
%br
2015-09-11 14:41:01 +05:30
or change it at #{link_to Gitlab.config.gravatar.host, "http://" + Gitlab.config.gravatar.host}
2014-09-02 18:07:02 +05:30
%hr
2015-04-26 12:48:37 +05:30
%a.choose-btn.btn.btn-sm.js-choose-user-avatar-button
%i.fa.fa-paperclip
2014-09-02 18:07:02 +05:30
%span Choose File ...
 
%span.file_name.js-avatar-filename File name...
= f.file_field :avatar, class: "js-user-avatar-input hidden"
2015-04-26 12:48:37 +05:30
.light The maximum file size allowed is 200KB.
2014-09-02 18:07:02 +05:30
- if @user.avatar?
%hr
2015-04-26 12:48:37 +05:30
= 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"
2014-09-02 18:07:02 +05:30
2015-12-23 02:04:40 +05:30
.form-actions
= f.submit 'Save changes', class: "btn btn-success"
= link_to "Cancel", user_path(current_user), class: "btn btn-cancel"