Skip to content
Snippets Groups Projects
Commit 53b101ec authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Add missing introduction to person index

parent 0dda8086
No related branches found
No related tags found
No related merge requests found
# Generated by Django 2.0.2 on 2018-08-31 19:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('people', '0011_change_the_contact_keys'),
]
operations = [
migrations.AddField(
model_name='personindexpage',
name='introduction',
field=models.TextField(blank=True),
),
]
...@@ -184,6 +184,16 @@ class PersonIndexPage(BasePage): ...@@ -184,6 +184,16 @@ class PersonIndexPage(BasePage):
subpage_types = ['PersonPage'] subpage_types = ['PersonPage']
parent_page_types = ['standardpages.IndexPage'] parent_page_types = ['standardpages.IndexPage']
introduction = models.TextField(blank=True)
content_panels = BasePage.content_panels + [
FieldPanel('introduction'),
]
search_fields = BasePage.search_fields + [
index.SearchField('introduction'),
]
def get_context(self, request, *args, **kwargs): def get_context(self, request, *args, **kwargs):
people = PersonPage.objects.live().public().descendant_of(self).order_by( people = PersonPage.objects.live().public().descendant_of(self).order_by(
'title', 'title',
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
{% block body_class %}light-grey-bg{% endblock %} {% block body_class %}light-grey-bg{% endblock %}
{% block content %} {% block content %}
<div class="wrapper wrapper--small wrapper--inner-space-medium"> <div class="wrapper wrapper--small wrapper--inner-space-medium">
{% if page.introduction %}
<h4 class="heading heading--listings-introduction">{{ page.introduction }}</h4>
{% endif %}
<form class="form" method="GET"> <form class="form" method="GET">
<div class="form__group form__group--checkbox"> <div class="form__group form__group--checkbox">
<div class="form__select form__select--narrow form__select--inline"> <div class="form__select form__select--narrow form__select--inline">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment