diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-09 12:30:49 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-09 12:30:49 +0300 |
commit | 87ffd67617095b0602b44a649d4d123e765ccdfc (patch) | |
tree | 5eb4e43c101024775a5e0e34627c9c01586becc8 /app/views/profiles | |
parent | 3fb1042d777f6b53632dacb6f853d94f830d8b18 (diff) | |
download | gitlab-ce-87ffd67617095b0602b44a649d4d123e765ccdfc.tar.gz |
Improve Profile settings UI
Diffstat (limited to 'app/views/profiles')
-rw-r--r-- | app/views/profiles/show.html.haml | 79 |
1 files changed, 21 insertions, 58 deletions
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index ad9d1d828e2..ada2892c6ba 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -1,17 +1,13 @@ -= image_tag avatar_icon(@user.email, 60), alt: '', class: 'avatar s60' %h3.page-title - = @user.name - %br - %small - = @user.email - - .pull-right - = link_to destroy_user_session_path, class: "logout", method: :delete do - %small - %i.icon-signout - Logout + Profile settings +%p.light + This information appears on your profile. + - if current_user.ldap_user? + Some options are unavailable for LDAP accounts %hr + + = form_for @user, url: profile_path, method: :put, html: { multipart: true, class: "edit_user form-horizontal" } do |f| -if @user.errors.any? %div.alert.alert-error @@ -40,9 +36,22 @@ = f.label :twitter, class: "control-label" .controls= f.text_field :twitter, class: "input-xlarge" .control-group - = f.label :avatar, class: "control-label" + = 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. + + .span5.pull-right + .light-well + = image_tag avatar_icon(@user.email, 160), alt: '', class: 'avatar s160' + + .clearfix .profile-avatar-form-option + %p.light + You can upload an avatar here + %br + or change it at #{link_to "gravatar.com", "http://gravatar.com"} + %hr %a.choose-btn.btn.btn-small.js-choose-user-avatar-button %i.icon-paper-clip %span Choose File ... @@ -50,52 +59,6 @@ %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. - .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. - - .span5.pull-right - %fieldset.tips - %legend Tips: - %ul - %li - %p You can change your password on the Account page - - if Gitlab.config.gravatar.enabled - %li - %p You can upload an avatar here or change it at #{link_to "gravatar.com", "http://gravatar.com"} - - - if Gitlab.config.omniauth.enabled && @user.provider? - %li - %p - You can login through #{@user.provider.titleize}! - = link_to "click here to change", account_profile_path - - if current_user.can_create_group? - %li - %p - Need a group for several dependent projects? - = link_to new_group_path, class: "btn btn-tiny" do - Create a group - - unless current_user.projects_limit_left > 100 - %fieldset - %legend - Personal projects: - %small.pull-right - %span= current_user.personal_projects.count - of - %span= current_user.projects_limit - .padded - .progress - .bar{style: "width: #{current_user.projects_limit_percent}%;"} - - %fieldset - %legend - SSH public keys: - %span.pull-right - = link_to pluralize(current_user.keys.count, 'key'), profile_keys_path - .padded - = link_to "Add Public Key", new_profile_key_path, class: "btn btn-small" .form-actions = f.submit 'Save changes', class: "btn btn-save" |