Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Discuss Data Project
Discuss Data
Commits
8aab003d
Commit
8aab003d
authored
May 17, 2021
by
felix.herrmann
Browse files
fix(login): add an extra login page for additional info before showing signin button
parent
d1136706
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
config/urls.py
View file @
8aab003d
...
...
@@ -13,6 +13,7 @@ from discuss_data.core.views import (
about_page
,
contacts_page
,
security_page
,
login_page
,
)
from
discuss_data.ddusers.views
import
datasets_act_feed
...
...
@@ -46,6 +47,7 @@ urlpatterns = [
path
(
"about/"
,
about_page
,
name
=
"core.about_page"
),
path
(
"contacts/"
,
contacts_page
,
name
=
"core.contacts_page"
),
path
(
"security/"
,
security_page
,
name
=
"core.security_page"
),
path
(
"login/"
,
login_page
,
name
=
"core.login_page"
),
path
(
"dashboard/"
,
datasets_act_feed
,
name
=
"ddusers.dashboard_page"
),
]
+
static
(
settings
.
MEDIA_URL
,
document_root
=
settings
.
MEDIA_ROOT
)
...
...
discuss_data/core/views.py
View file @
8aab003d
...
...
@@ -277,6 +277,14 @@ def security_page(request):
return
render
(
request
,
"pages/text_page.html"
,
{
"page"
:
page
},)
def
login_page
(
request
):
"""
Platform login page
"""
page
=
get_object_or_404
(
TextPage
,
slug
=
"discuss-data-loginpage"
)
return
render
(
request
,
"login.html"
,
{
"page"
:
page
},)
def
handler404
(
request
):
response
=
render
(
request
,
"404.html"
)
response
.
status_code
=
404
...
...
discuss_data/templates/landingpage/nav_top_landing_page.html
View file @
8aab003d
...
...
@@ -52,7 +52,7 @@
</li>
{% else %}
<li
class=
"nav-item"
>
<a
id=
"log-in-link"
class=
"nav-link"
href=
"{% url '
shibboleth:login
' %}"
>
{% trans "Sign In" %}
</a>
<a
id=
"log-in-link"
class=
"nav-link"
href=
"{% url '
core.login_page
' %}"
>
{% trans "Sign In" %}
</a>
</li>
{% endif %}
<li
class=
"nav-item"
>
...
...
discuss_data/templates/nav-top.html
View file @
8aab003d
...
...
@@ -33,7 +33,7 @@
</li>
{% else %}
<li
class=
"nav-item"
>
<a
id=
"log-in-link"
class=
"nav-link"
href=
"{% url '
shibboleth:login
' %}"
>
{% trans "Sign In" %}
</a>
<a
id=
"log-in-link"
class=
"nav-link"
href=
"{% url '
core.login_page
' %}"
>
{% trans "Sign In" %}
</a>
</li>
{% endif %}
<li
class=
"nav-item"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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