diff --git a/publichealth/home/models/models.py b/publichealth/home/models/models.py index de655aa..46e47d1 100644 --- a/publichealth/home/models/models.py +++ b/publichealth/home/models/models.py @@ -40,6 +40,8 @@ class ArticleIndexPage(Page): 'title_en', ) + header_image = ImageChooserBlock(required=False) + intro_de = RichTextField(default='', blank=True) intro_fr = RichTextField(default='', blank=True) intro_en = RichTextField(default='', blank=True) @@ -73,6 +75,7 @@ class ArticleIndexPage(Page): FieldPanel('intro_fr'), FieldPanel('title_en'), FieldPanel('intro_en'), + ImageChooserPanel('header_image'), ImageChooserPanel('feed_image'), MultiFieldPanel( [ diff --git a/publichealth/home/templates/home/article_index_page.html b/publichealth/home/templates/home/article_index_page.html index 6cd4cca..802e245 100644 --- a/publichealth/home/templates/home/article_index_page.html +++ b/publichealth/home/templates/home/article_index_page.html @@ -16,7 +16,17 @@ {% else %} + {% if page.header_image %} + + {% endif %}

{{ page.trans_title }}