Commit acc5302c3fea3f07a654e270f06ebf96fec14c5c
1 parent
64f026b2
Exists in
master
and in
4 other branches
improve profile layout after omniauth changes
Showing
6 changed files
with
67 additions
and
47 deletions
Show diff stats
app/assets/stylesheets/common.scss
| @@ -689,3 +689,17 @@ li.note { | @@ -689,3 +689,17 @@ li.note { | ||
| 689 | text-align:center; | 689 | text-align:center; |
| 690 | margin-bottom:10px; | 690 | margin-bottom:10px; |
| 691 | } | 691 | } |
| 692 | + | ||
| 693 | +.oauth_select_holder { | ||
| 694 | + padding:20px; | ||
| 695 | + img { | ||
| 696 | + padding:5px; | ||
| 697 | + margin-right:10px; | ||
| 698 | + } | ||
| 699 | + .active { | ||
| 700 | + img { | ||
| 701 | + border:1px solid #ccc; | ||
| 702 | + @include border-radius(5px); | ||
| 703 | + } | ||
| 704 | + } | ||
| 705 | +} |
app/assets/stylesheets/gitlab_bootstrap/blocks.scss
app/views/profile/password.html.haml
| 1 | +- if Gitlab.config.omniauth_enabled? | ||
| 2 | + %h3.page_title Accounts | ||
| 3 | + %hr | ||
| 4 | + %p.hint Tip: Click on icon to activate sigin with one of the following services | ||
| 5 | + .oauth_select_holder | ||
| 6 | + - User.omniauth_providers.each do |provider| | ||
| 7 | + %span{class: oauth_active_class(provider) } | ||
| 8 | + = link_to authbutton(provider, 32), omniauth_authorize_path(User, provider) | ||
| 9 | + | ||
| 10 | +.clearfix.prepend-top-20 | ||
| 1 | %h3.page_title Password | 11 | %h3.page_title Password |
| 2 | %hr | 12 | %hr |
| 3 | 13 | ||
| 4 | = form_for @user, url: profile_password_path, method: :put do |f| | 14 | = form_for @user, url: profile_password_path, method: :put do |f| |
| 5 | - .row | ||
| 6 | - .span7 | ||
| 7 | - .data | ||
| 8 | - %p.slead After successful password update you will be redirected to login page where you should login with new password | ||
| 9 | - -if @user.errors.any? | ||
| 10 | - .alert-message.block-message.error | ||
| 11 | - %ul | ||
| 12 | - - @user.errors.full_messages.each do |msg| | ||
| 13 | - %li= msg | ||
| 14 | - | ||
| 15 | - .clearfix | ||
| 16 | - = f.label :password | ||
| 17 | - .input= f.password_field :password | ||
| 18 | - .clearfix | ||
| 19 | - = f.label :password_confirmation | ||
| 20 | - .input= f.password_field :password_confirmation | 15 | + %p.slead After successful password update you will be redirected to login page where you should login with new password |
| 16 | + -if @user.errors.any? | ||
| 17 | + .alert-message.block-message.error | ||
| 18 | + %ul | ||
| 19 | + - @user.errors.full_messages.each do |msg| | ||
| 20 | + %li= msg | ||
| 21 | 21 | ||
| 22 | - - if Gitlab.config.omniauth_enabled? | ||
| 23 | - .span5.right | ||
| 24 | - .alert.alert-info | ||
| 25 | - %strong Tip: Use one of the following sites to login | ||
| 26 | - %ul.unstyled | ||
| 27 | - - User.omniauth_providers.each do |provider| | ||
| 28 | - %li= link_to authbutton(provider), | | ||
| 29 | - omniauth_authorize_path(User, provider) | | 22 | + .clearfix |
| 23 | + = f.label :password | ||
| 24 | + .input= f.password_field :password | ||
| 25 | + .clearfix | ||
| 26 | + = f.label :password_confirmation | ||
| 27 | + .input= f.password_field :password_confirmation | ||
| 30 | .actions | 28 | .actions |
| 31 | = f.submit 'Save', class: "btn save-btn" | 29 | = f.submit 'Save', class: "btn save-btn" |
app/views/profile/show.html.haml
| @@ -6,7 +6,6 @@ | @@ -6,7 +6,6 @@ | ||
| 6 | %small | 6 | %small |
| 7 | = @user.email | 7 | = @user.email |
| 8 | 8 | ||
| 9 | - | ||
| 10 | %hr | 9 | %hr |
| 11 | 10 | ||
| 12 | = form_for @user, url: profile_update_path, method: :put, html: { class: "edit_user form-horizontal" } do |f| | 11 | = form_for @user, url: profile_update_path, method: :put, html: { class: "edit_user form-horizontal" } do |f| |
| @@ -28,7 +27,23 @@ | @@ -28,7 +27,23 @@ | ||
| 28 | = f.text_field :email, class: "input-xlarge" | 27 | = f.text_field :email, class: "input-xlarge" |
| 29 | %span.help-block We also use email for avatar detection. | 28 | %span.help-block We also use email for avatar detection. |
| 30 | 29 | ||
| 31 | - %hr | 30 | + .span5.right |
| 31 | + %div.tips | ||
| 32 | + %h6 Tips: | ||
| 33 | + %ul | ||
| 34 | + -unless Gitlab.config.disable_gravatar? | ||
| 35 | + %li | ||
| 36 | + %p.hint You can change your avatar at gravatar.com | ||
| 37 | + | ||
| 38 | + - if Gitlab.config.omniauth_enabled? && @user.provider? | ||
| 39 | + %li | ||
| 40 | + %p.hint | ||
| 41 | + You can login through #{@user.provider.titleize}! | ||
| 42 | + = link_to "click here to change", profile_password_path | ||
| 43 | + | ||
| 44 | + %hr | ||
| 45 | + .row | ||
| 46 | + .span7 | ||
| 32 | .control-group | 47 | .control-group |
| 33 | = f.label :skype, class: "control-label" | 48 | = f.label :skype, class: "control-label" |
| 34 | .controls= f.text_field :skype, class: "input-xlarge" | 49 | .controls= f.text_field :skype, class: "input-xlarge" |
| @@ -44,23 +59,7 @@ | @@ -44,23 +59,7 @@ | ||
| 44 | = f.text_area :bio, rows: 6, class: "input-xlarge", maxlength: 250 | 59 | = f.text_area :bio, rows: 6, class: "input-xlarge", maxlength: 250 |
| 45 | %span.help-block Tell us about yourself in fewer than 250 characters. | 60 | %span.help-block Tell us about yourself in fewer than 250 characters. |
| 46 | .span5.right | 61 | .span5.right |
| 47 | - | ||
| 48 | - -unless Gitlab.config.disable_gravatar? | ||
| 49 | - %p.alert.alert-info | ||
| 50 | - %strong Tip: | ||
| 51 | - You can change your avatar at gravatar.com | ||
| 52 | - | ||
| 53 | - - @user.provider = 'twitter' | ||
| 54 | - - if Gitlab.config.omniauth_enabled? && @user.provider? | ||
| 55 | - .ui-box | ||
| 56 | - .ui-box-body | ||
| 57 | - %h4 | ||
| 58 | - Omniauth Providers: | ||
| 59 | - = link_to "Change", profile_password_path, class: "btn small right" | ||
| 60 | - You can login through #{@user.provider.titleize}! | ||
| 61 | - = authbutton(@user.provider, 32) | ||
| 62 | - | ||
| 63 | - .ui-box | 62 | + .ui-box.white |
| 64 | .ui-box-body | 63 | .ui-box-body |
| 65 | %h4 | 64 | %h4 |
| 66 | Personal projects: | 65 | Personal projects: |
| @@ -71,7 +70,7 @@ | @@ -71,7 +70,7 @@ | ||
| 71 | .progress | 70 | .progress |
| 72 | .bar{style: "width: #{current_user.projects_limit_percent}%;"} | 71 | .bar{style: "width: #{current_user.projects_limit_percent}%;"} |
| 73 | 72 | ||
| 74 | - .ui-box | 73 | + .ui-box.white |
| 75 | .ui-box-body | 74 | .ui-box-body |
| 76 | %h4 | 75 | %h4 |
| 77 | SSH public keys: | 76 | SSH public keys: |
config/gitlab.yml.example
| @@ -26,8 +26,6 @@ app: | @@ -26,8 +26,6 @@ app: | ||
| 26 | # disable_gravatar: true # default: false - Disable user avatars from Gravatar.com | 26 | # disable_gravatar: true # default: false - Disable user avatars from Gravatar.com |
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | - | ||
| 30 | - | ||
| 31 | # | 29 | # |
| 32 | # 2. Auth settings | 30 | # 2. Auth settings |
| 33 | # ========================== | 31 | # ========================== |
| @@ -44,7 +42,7 @@ ldap: | @@ -44,7 +42,7 @@ ldap: | ||
| 44 | omniauth: | 42 | omniauth: |
| 45 | # Enable ability for users | 43 | # Enable ability for users |
| 46 | # to login via twitter, google .. | 44 | # to login via twitter, google .. |
| 47 | - enabled: true | 45 | + enabled: false |
| 48 | 46 | ||
| 49 | # IMPORTANT! | 47 | # IMPORTANT! |
| 50 | # It allows user to login without having user account | 48 | # It allows user to login without having user account |