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
1b05b3c6
Commit
1b05b3c6
authored
Jun 26, 2020
by
felix.herrmann
Browse files
feat(generalinfo): add about page and add link to it and to contact to top nav. Fixes
#101
parent
db17b65a
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
config/urls.py
View file @
1b05b3c6
...
...
@@ -8,7 +8,10 @@ from wagtail.admin import urls as wagtailadmin_urls
from
wagtail.documents
import
urls
as
wagtaildocs_urls
from
wagtail.core
import
urls
as
wagtail_urls
from
discuss_data.core.views
import
landing_page
from
discuss_data.core.views
import
(
landing_page
,
about_page
,
)
from
discuss_data.ddusers.views
import
following_act_feed
...
...
@@ -38,6 +41,7 @@ urlpatterns = [
path
(
"dhrep/"
,
include
(
"discuss_data.dhrep.urls"
,
namespace
=
"dhrep"
)),
path
(
"shib/"
,
include
(
"shibboleth.urls"
,
namespace
=
"shibboleth"
)),
path
(
""
,
landing_page
,
name
=
"core.landing_page"
),
path
(
"about/"
,
about_page
,
name
=
"core.about_page"
),
path
(
"dashboard/"
,
following_act_feed
,
name
=
"ddusers.dashboard_page"
),
]
+
static
(
settings
.
MEDIA_URL
,
document_root
=
settings
.
MEDIA_ROOT
)
...
...
discuss_data/core/views.py
View file @
1b05b3c6
...
...
@@ -222,6 +222,14 @@ def landing_page(request):
)
def
about_page
(
request
):
"""
Platform about page
"""
page
=
get_object_or_404
(
LandingPage
,
slug
=
"discuss-data-landingpage"
)
return
render
(
request
,
"about.html"
,
{
"page"
:
page
},)
def
check_perms
(
permission
,
user
,
dd_obj
):
try
:
if
dd_obj
.
owner
==
user
:
...
...
discuss_data/templates/about.html
0 → 100644
View file @
1b05b3c6
{% extends request.is_intercooler|yesno:"blank.html,base.html" %}
{% load wagtailcore_tags i18n %}
{% block ic-content %}
<div
class=
"container"
>
<h1
class=
"docupage-title"
>
{% trans 'About Discuss Data' %}
</h1>
{# project #}
<div
id=
"project"
>
<h2
class=
"lp-section"
>
{% trans "Project Description" %}
</h2>
<div>
{{ page.project_description }}
</div>
</div>
{# end project #}
{# team #}
<div
id=
"team"
>
<h2
class=
"lp-section"
>
{% trans "Team" %}
</h2>
<div
class=
"row"
>
{% for member in page.team_member.all %}
{% include "landingpage/_team_member_landing_page.html" with member=member %}
{% endfor %}
</div>
</div>
{# end team #}
{# advisory-board #}
<div
id=
"advisory-board"
>
<h2
class=
"lp-section"
>
{% trans "Advisory Board" %}
</h2>
{{ page.advisory_board | richtext }}
</div>
{# end advisory-board #}
</div>
{% endblock %}
discuss_data/templates/nav-top.html
View file @
1b05b3c6
{% load static i18n compress%}
{% load static i18n
wagtailcore_tags
compress
%}
<nav
class=
"navbar navbar-light fixed-top flex-md-nowrap p-0 border-bottom navbar-expand-sm"
id=
"navbar-top"
>
<a
class=
"navbar-brand px-3"
href=
"{% url 'core.landing_page' %}"
><img
class=
"navbar-logo"
src=
"{% static 'images/logo-primary.svg' %}"
/></a>
...
...
@@ -17,10 +17,10 @@
<ul
class=
"navbar-nav ml-auto"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"
#
"
>
{% trans "About" %}
</a>
<a
class=
"nav-link"
href=
"
{% url 'core.about_page' %}
"
>
{% trans "About" %}
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"
#
"
>
{% trans "Contact" %}
</a>
<a
class=
"nav-link"
href=
"
{% slugurl 'contact' %}
"
>
{% trans "Contact" %}
</a>
</li>
{% if request.user.is_authenticated %}
...
...
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