2013-10-06 18:13:56 +00:00
|
|
|
= image_tag avatar_icon(@user.email, 60), alt: '', class: 'avatar s60'
|
2013-07-13 05:45:48 +00:00
|
|
|
%h3.page-title
|
2012-04-24 18:49:34 +00:00
|
|
|
= @user.name
|
|
|
|
%br
|
|
|
|
%small
|
|
|
|
= @user.email
|
|
|
|
|
2013-01-30 14:40:43 +00:00
|
|
|
.pull-right
|
2013-01-17 15:35:57 +00:00
|
|
|
= link_to destroy_user_session_path, class: "logout", method: :delete do
|
|
|
|
%small
|
|
|
|
%i.icon-signout
|
|
|
|
Logout
|
2012-01-29 21:59:12 +00:00
|
|
|
%hr
|
2011-10-19 22:34:05 +00:00
|
|
|
|
2013-10-06 18:13:56 +00:00
|
|
|
= form_for @user, url: profile_path, method: :put, html: { multipart: true, class: "edit_user form-horizontal" } do |f|
|
2012-01-26 23:46:32 +00:00
|
|
|
-if @user.errors.any?
|
2013-01-30 14:53:18 +00:00
|
|
|
%div.alert.alert-error
|
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
|
2012-04-10 05:51:08 +00:00
|
|
|
.span7
|
|
|
|
.control-group
|
2012-08-10 22:07:50 +00:00
|
|
|
= f.label :name, class: "control-label"
|
2012-04-10 05:51:08 +00:00
|
|
|
.controls
|
2012-11-21 05:14:05 +00:00
|
|
|
= f.text_field :name, class: "input-xlarge", required: true
|
2012-04-19 11:01:58 +00:00
|
|
|
%span.help-block Enter your name, so people you know can recognize you.
|
2012-04-10 05:51:08 +00:00
|
|
|
.control-group
|
2012-08-10 22:07:50 +00:00
|
|
|
= f.label :email, class: "control-label"
|
2012-04-10 05:51:08 +00:00
|
|
|
.controls
|
2012-11-21 05:14:05 +00:00
|
|
|
= f.text_field :email, class: "input-xlarge", required: true
|
2013-10-06 18:13:56 +00:00
|
|
|
%span.help-block We also use email for avatar detection if no avatar is uploaded.
|
2013-01-25 14:36:14 +00:00
|
|
|
.control-group
|
|
|
|
= f.label :skype, class: "control-label"
|
|
|
|
.controls= f.text_field :skype, class: "input-xlarge"
|
|
|
|
.control-group
|
|
|
|
= f.label :linkedin, class: "control-label"
|
|
|
|
.controls= f.text_field :linkedin, class: "input-xlarge"
|
|
|
|
.control-group
|
|
|
|
= f.label :twitter, class: "control-label"
|
|
|
|
.controls= f.text_field :twitter, class: "input-xlarge"
|
2013-10-06 18:13:56 +00:00
|
|
|
.control-group
|
|
|
|
= f.label :avatar, class: "control-label"
|
|
|
|
.controls
|
|
|
|
.profile-avatar-form-option
|
|
|
|
%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...
|
|
|
|
= f.file_field :avatar, class: "js-user-avatar-input hide"
|
|
|
|
%span.help-block The maximum file size allowed is 200KB.
|
2013-01-25 14:36:14 +00:00
|
|
|
.control-group
|
|
|
|
= f.label :bio, class: "control-label"
|
|
|
|
.controls
|
|
|
|
= f.text_area :bio, rows: 6, class: "input-xlarge", maxlength: 250
|
|
|
|
%span.help-block Tell us about yourself in fewer than 250 characters.
|
2012-04-24 18:49:34 +00:00
|
|
|
|
2013-01-30 14:40:43 +00:00
|
|
|
.span5.pull-right
|
2012-11-21 05:14:05 +00:00
|
|
|
%fieldset.tips
|
|
|
|
%legend Tips:
|
2012-09-12 15:56:44 +00:00
|
|
|
%ul
|
2012-11-21 05:14:05 +00:00
|
|
|
%li
|
2013-04-12 15:17:29 +00:00
|
|
|
%p You can change your password on the Account page
|
2012-12-15 01:19:21 +00:00
|
|
|
- if Gitlab.config.gravatar.enabled
|
2012-09-12 15:56:44 +00:00
|
|
|
%li
|
2013-10-06 18:13:56 +00:00
|
|
|
%p You can upload an avatar here or change it at #{link_to "gravatar.com", "http://gravatar.com"}
|
2012-09-12 15:56:44 +00:00
|
|
|
|
2012-12-15 00:16:25 +00:00
|
|
|
- if Gitlab.config.omniauth.enabled && @user.provider?
|
2012-09-12 15:56:44 +00:00
|
|
|
%li
|
2012-12-02 11:29:24 +00:00
|
|
|
%p
|
2012-09-12 15:56:44 +00:00
|
|
|
You can login through #{@user.provider.titleize}!
|
2012-12-02 11:29:24 +00:00
|
|
|
= link_to "click here to change", account_profile_path
|
2013-01-25 14:25:43 +00:00
|
|
|
- if current_user.can_create_group?
|
|
|
|
%li
|
|
|
|
%p
|
|
|
|
Need a group for several dependent projects?
|
2013-01-29 20:29:21 +00:00
|
|
|
= link_to new_group_path, class: "btn btn-tiny" do
|
2013-01-25 14:25:43 +00:00
|
|
|
Create a group
|
2013-04-03 15:36:37 +00:00
|
|
|
- unless current_user.projects_limit_left > 100
|
|
|
|
%fieldset
|
|
|
|
%legend
|
2013-06-26 11:41:03 +00:00
|
|
|
Personal projects:
|
2013-04-03 15:36:37 +00:00
|
|
|
%small.pull-right
|
2013-06-26 11:41:03 +00:00
|
|
|
%span= current_user.personal_projects.count
|
2013-04-03 15:36:37 +00:00
|
|
|
of
|
|
|
|
%span= current_user.projects_limit
|
|
|
|
.padded
|
|
|
|
.progress
|
|
|
|
.bar{style: "width: #{current_user.projects_limit_percent}%;"}
|
2012-04-24 18:49:34 +00:00
|
|
|
|
2012-11-21 05:14:05 +00:00
|
|
|
%fieldset
|
|
|
|
%legend
|
|
|
|
SSH public keys:
|
2013-01-30 14:40:43 +00:00
|
|
|
%span.pull-right
|
2013-06-24 15:24:14 +00:00
|
|
|
= link_to pluralize(current_user.keys.count, 'key'), profile_keys_path
|
2012-11-21 05:14:05 +00:00
|
|
|
.padded
|
2013-06-24 15:24:14 +00:00
|
|
|
= link_to "Add Public Key", new_profile_key_path, class: "btn btn-small"
|
2012-04-24 18:49:34 +00:00
|
|
|
|
2012-04-10 05:51:08 +00:00
|
|
|
.form-actions
|
2013-08-01 19:35:40 +00:00
|
|
|
= f.submit 'Save changes', class: "btn btn-save"
|