Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
84999611
Commit
84999611
authored
Nov 07, 2015
by
Jeroen van Baarsen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9812 from chrspeich/hide-tabs-lone-auth-provider
Hide tab-bar in login-box when only one tabs is shown.
parents
0d9fb211
b14198a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
19 deletions
+27
-19
app/views/devise/shared/_signin_box.html.haml
app/views/devise/shared/_signin_box.html.haml
+27
-19
No files found.
app/views/devise/shared/_signin_box.html.haml
View file @
84999611
...
...
@@ -7,26 +7,34 @@
%h3
Sign in
.login-body
-
if
form_based_providers
.
any?
%ul
.nav.nav-tabs
-
if
form_based_providers
.
count
>=
2
||
signin_enabled?
%ul
.nav.nav-tabs
-
if
crowd_enabled?
%li
.active
=
link_to
"Crowd"
,
"#tab-crowd"
,
'data-toggle'
=>
'tab'
-
@ldap_servers
.
each_with_index
do
|
server
,
i
|
%li
{
class:
(
:active
if
i
.
zero?
&&
!
crowd_enabled?
)}
=
link_to
server
[
'label'
],
"#tab-
#{
server
[
'provider_name'
]
}
"
,
'data-toggle'
=>
'tab'
-
if
signin_enabled?
%li
=
link_to
'Standard'
,
'#tab-signin'
,
'data-toggle'
=>
'tab'
.tab-content
-
if
crowd_enabled?
%div
.tab-pane.active
{
id:
"tab-crowd"
}
=
render
'devise/sessions/new_crowd'
-
@ldap_servers
.
each_with_index
do
|
server
,
i
|
%div
.tab-pane
{
id:
"tab-#{server['provider_name']}"
,
class:
(
:active
if
i
.
zero?
&&
!
crowd_enabled?
)}
=
render
'devise/sessions/new_ldap'
,
server:
server
-
if
signin_enabled?
%div
#tab-signin
.tab-pane
=
render
'devise/sessions/new_base'
-
else
-
if
crowd_enabled?
%li
.active
=
link_to
"Crowd"
,
"#tab-crowd"
,
'data-toggle'
=>
'tab'
-
@ldap_servers
.
each_with_index
do
|
server
,
i
|
%li
{
class:
(
:active
if
i
.
zero?
&&
!
crowd_enabled?
)}
=
link_to
server
[
'label'
],
"#tab-
#{
server
[
'provider_name'
]
}
"
,
'data-toggle'
=>
'tab'
-
if
signin_enabled?
%li
=
link_to
'Standard'
,
'#tab-signin'
,
'data-toggle'
=>
'tab'
.tab-content
-
if
crowd_enabled?
%div
.tab-pane.active
{
id:
"tab-crowd"
}
=
render
'devise/sessions/new_crowd'
-
@ldap_servers
.
each_with_index
do
|
server
,
i
|
%div
.tab-pane
{
id:
"tab-#{server['provider_name']}"
,
class:
(
:active
if
i
.
zero?
&&
!
crowd_enabled?
)}
=
render
'devise/sessions/new_ldap'
,
server:
server
-
if
signin_enabled?
%div
#tab-signin
.tab-pane
=
render
'devise/sessions/new_base'
=
render
'devise/sessions/new_crowd'
-
elsif
@ldap_servers
.
any?
=
render
'devise/sessions/new_ldap'
,
server:
@ldap_servers
.
first
-
elsif
signin_enabled?
=
render
'devise/sessions/new_base'
-
elsif
signin_enabled?
=
render
'devise/sessions/new_base'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment