Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-02-13 20:43:17 +0300
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-02-13 20:43:17 +0300
commit917ae13bf8d31296ab5de6f494727d9b94d60265 (patch)
tree9f3ee4f69ff7dd970af1baf5945fab5030cc8a16 /app
parent2f9661dcd30219ced570944de2f4384ded429055 (diff)
parent7c39e728ef348482bd8caeeeeba2316ace92f4e9 (diff)
Merge branch 'signin-page-headings' into 'master'
Add headings to signin/signup blocks on signin page. See #1986 ![Screen Shot 2015-02-13 at 15.17.34](https://dev.gitlab.org/uploads/gitlab/gitlabhq/4feb067a23/Screen_Shot_2015-02-13_at_15.17.34.png) When signup is disabled, the heading for sign in only reads "Sign in", because there is no longer a choice of Existing/New user. I've moved the OAuth signin options to just below the signin box because it looked odd as a separate box without a heading. cc @sytse See merge request !1516
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/sections/login.scss3
-rw-r--r--app/views/devise/registrations/new.html.haml6
-rw-r--r--app/views/devise/sessions/new.html.haml9
-rw-r--r--app/views/devise/shared/_oauth_box.html.haml10
-rw-r--r--app/views/devise/shared/_signin_box.html.haml21
-rw-r--r--app/views/devise/shared/_signup_box.html.haml13
6 files changed, 32 insertions, 30 deletions
diff --git a/app/assets/stylesheets/sections/login.scss b/app/assets/stylesheets/sections/login.scss
index 3a3644c12b7..d366300511e 100644
--- a/app/assets/stylesheets/sections/login.scss
+++ b/app/assets/stylesheets/sections/login.scss
@@ -40,8 +40,7 @@
.login-heading h3 {
font-weight: 300;
line-height: 1.5;
- margin: 0;
- display: none;
+ margin: 0 0 10px 0;
}
.login-footer {
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 &nbsp;
- - 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 70587329033..805cf816231 100644
--- a/app/views/devise/shared/_signin_box.html.haml
+++ b/app/views/devise/shared/_signin_box.html.haml
@@ -1,6 +1,10 @@
.login-box
- .login-heading
- %h3 Sign in
+ - if signup_enabled?
+ .login-heading
+ %h3 Existing user? Sign in
+ - else
+ .login-heading
+ %h3 Sign in
.login-body
- if ldap_enabled?
%ul.nav.nav-tabs
@@ -23,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 &nbsp;
+ - 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 8a6dc19ab64..dcf60c90430 100644
--- a/app/views/devise/shared/_signup_box.html.haml
+++ b/app/views/devise/shared/_signup_box.html.haml
@@ -1,6 +1,10 @@
.login-box
- .login-heading
- %h3 Sign up
+ - if signin_enabled?
+ .login-heading
+ %h3 New user? Create an account
+ - else
+ .login-heading
+ %h3 Create an account
.login-body
= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
.devise-errors
@@ -15,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