From 7c39e728ef348482bd8caeeeeba2316ace92f4e9 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 13 Feb 2015 15:16:17 +0100 Subject: Move OAuth signin options just below signin box. --- app/views/devise/registrations/new.html.haml | 6 +----- app/views/devise/sessions/new.html.haml | 9 --------- app/views/devise/shared/_oauth_box.html.haml | 10 ---------- app/views/devise/shared/_signin_box.html.haml | 13 +++++++++++++ app/views/devise/shared/_signup_box.html.haml | 5 +++++ 5 files changed, 19 insertions(+), 24 deletions(-) delete mode 100644 app/views/devise/shared/_oauth_box.html.haml diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index c07e409d583..d3e37f7494c 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -1,7 +1,3 @@ = render 'devise/shared/signup_box' -.clearfix.prepend-top-20 - = render 'devise/shared/sign_in_link' - %p - %span.light Did not receive confirmation email? - = link_to "Send again", new_confirmation_path(resource_name) \ No newline at end of file += render 'devise/shared/sign_in_link' \ No newline at end of file diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index 6d8415613d1..fa2460518fc 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -1,15 +1,6 @@ %div = render 'devise/shared/signin_box' - - if Gitlab.config.omniauth.enabled && devise_mapping.omniauthable? - .prepend-top-20 - = render 'devise/shared/oauth_box' - - if signup_enabled? .prepend-top-20 = render 'devise/shared/signup_box' - -.clearfix.prepend-top-20 - %p - %span.light Did not receive confirmation email? - = link_to "Send again", new_confirmation_path(resource_name) diff --git a/app/views/devise/shared/_oauth_box.html.haml b/app/views/devise/shared/_oauth_box.html.haml deleted file mode 100644 index c2e1373de30..00000000000 --- a/app/views/devise/shared/_oauth_box.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -- providers = additional_providers -- if providers.present? - .login-box{:'data-no-turbolink' => 'data-no-turbolink'} - %span Sign in with   - - providers.each do |provider| - %span - - if default_providers.include?(provider) - = link_to authbutton(provider, 32), omniauth_authorize_path(resource_name, provider) - - else - = link_to provider.to_s.titleize, omniauth_authorize_path(resource_name, provider), class: "btn" diff --git a/app/views/devise/shared/_signin_box.html.haml b/app/views/devise/shared/_signin_box.html.haml index 04d33132e91..805cf816231 100644 --- a/app/views/devise/shared/_signin_box.html.haml +++ b/app/views/devise/shared/_signin_box.html.haml @@ -27,3 +27,16 @@ - else %div No authentication methods configured. + +- if Gitlab.config.omniauth.enabled && devise_mapping.omniauthable? + .clearfix.prepend-top-20 + %p + %span.light + Sign in with   + - providers = additional_providers + - providers.each do |provider| + %span.light + - if default_providers.include?(provider) + = link_to authbutton(provider, 32), omniauth_authorize_path(resource_name, provider) + - else + = link_to provider.to_s.titleize, omniauth_authorize_path(resource_name, provider), class: "btn" \ No newline at end of file diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml index 0db123d78ff..dcf60c90430 100644 --- a/app/views/devise/shared/_signup_box.html.haml +++ b/app/views/devise/shared/_signup_box.html.haml @@ -19,3 +19,8 @@ = f.password_field :password, class: "form-control bottom", id: "user_password_sign_up", placeholder: "Password", required: true %div = f.submit "Sign up", class: "btn-create btn" + +.clearfix.prepend-top-20 + %p + %span.light Did not receive confirmation email? + = link_to "Send again", new_confirmation_path(resource_name) \ No newline at end of file -- cgit v1.2.1