Commit b67b3cdb authored by felix.herrmann's avatar felix.herrmann
Browse files

feat(footer): add TextPage model for simple pages for terms of use, imprint...

feat(footer): add TextPage model for simple pages for terms of use, imprint etc and link those pages per slugurl in footer
parent f2d5cc03
# Generated by Django 2.2.13 on 2020-06-26 06:28
from django.db import migrations, models
import django.db.models.deletion
import wagtail.core.fields
class Migration(migrations.Migration):
dependencies = [
('wagtailcore', '0045_assign_unlock_grouppagepermission'),
('pages', '0020_landingpage_short_description'),
]
operations = [
migrations.CreateModel(
name='TextPage',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
('text', wagtail.core.fields.RichTextField(blank=True)),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
]
......@@ -193,3 +193,15 @@ class LicensePage(Page):
FieldPanel("link"),
ImageChooserPanel("image"),
]
class TextPage(Page):
text = RichTextField(blank=True)
search_fields = Page.search_fields + [
index.SearchField("text"),
]
content_panels = Page.content_panels + [
FieldPanel("text", classname="full"),
]
{% load static i18n compress%}
{% load static i18n compress wagtailcore_tags %}
<footer class="footer no-gutters fixed-bottom">
<div class="container">
<div class="row justify-content-lg-center">
......@@ -16,19 +16,19 @@
<nav>
<ul class="nav nav-pills flex-column footer-nav">
<li class="nav-item">
<a href="#">{% trans "Terms of Use" %}</a>
<a href="{% slugurl 'terms-of-use' %}">{% trans "Terms of Use" %}</a>
</li>
<li class="nav-item">
<a href="#">{% trans "Privacy Policy" %}</a>
<a href="{% slugurl 'privacy-policy' %}">{% trans "Privacy Policy" %}</a>
</li>
<li class="nav-item">
<a href="#">{% trans "Terms and Conditions" %}</a>
<a href="{% slugurl 'terms-and-conditions' %}">{% trans "Terms and Conditions" %}</a>
</li>
<li class="nav-item">
<a href="#">{% trans "Imprint" %}</a>
<a href="{% slugurl 'imprint' %}">{% trans "Imprint" %}</a>
</li>
<li class="nav-item">
<a href="#">{% trans "Disclaimer" %}</a>
<a href="{% slugurl 'disclaimer' %}">{% trans "Disclaimer" %}</a>
</li>
</ul>
</nav>
......
{% extends request.is_intercooler|yesno:"blank.html,base.html" %}
{% load wagtailcore_tags wagtailimages_tags %}
{% block ic-content %}
<h2 class="docupage-title">{{ page.title }}</h2>
{{ page.text|richtext }}
{% endblock ic-content %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment