Cleanup after omniauth

This commit is contained in:
Dmitriy Zaporozhets 2012-09-12 08:23:20 +03:00
parent 486de8c3f4
commit fa4150d47d
9 changed files with 49 additions and 47 deletions

View file

@ -15,7 +15,8 @@
.right
= render :partial => "devise/shared/links"
- if devise_mapping.omniauthable?
- resource_class.omniauth_providers.each do |provider|
%hr/
= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider), :class => "btn primary"
%br/
%hr/
%ul.unstyled
- resource_class.omniauth_providers.each do |provider|
%li
= link_to authbutton(provider, 32), omniauth_authorize_path(resource_name, provider)

View file

@ -19,11 +19,11 @@
= f.label :password_confirmation
.input= f.password_field :password_confirmation
- if Settings.omniauth.enabled
- if Gitlab.config.omniauth_enabled?
.span5.right
.auth_methods.alert.alert-info
.alert.alert-info
%strong Tip: Use one of the following sites to login
%ul
%ul.unstyled
- User.omniauth_providers.each do |provider|
%li= link_to authbutton(provider), |
omniauth_authorize_path(User, provider) |

View file

@ -50,28 +50,34 @@
%strong Tip:
You can change your avatar at gravatar.com
- if Settings.omniauth.enabled && @user.provider?
%h4
Omniauth Providers:
= link_to "Change", profile_password_path, class: "btn small right"
You can login through #{@user.provider.titleize}!
= authbutton(@user.provider, 32)
- @user.provider = 'twitter'
- if Gitlab.config.omniauth_enabled? && @user.provider?
.ui-box
.ui-box-body
%h4
Omniauth Providers:
= link_to "Change", profile_password_path, class: "btn small right"
You can login through #{@user.provider.titleize}!
= authbutton(@user.provider, 32)
%h4
Personal projects:
%small.right
%span= current_user.my_own_projects.count
of
%span= current_user.projects_limit
.progress
.bar{style: "width: #{current_user.projects_limit_percent}%;"}
.ui-box
.ui-box-body
%h4
Personal projects:
%small.right
%span= current_user.my_own_projects.count
of
%span= current_user.projects_limit
.progress
.bar{style: "width: #{current_user.projects_limit_percent}%;"}
%h4
SSH public keys:
%small.right
%span= link_to current_user.keys.count, keys_path
.ui-box
.ui-box-body
%h4
SSH public keys:
%strong.right= link_to current_user.keys.count, keys_path
= link_to "Add Public Key", new_key_path, class: "btn small right"
= link_to "Add Public Key", new_key_path, class: "btn small"
.form-actions
= f.submit 'Save', class: "btn save-btn"