Skip to content
Snippets Groups Projects
Commit bebbb901 authored by Tomáš Valenta's avatar Tomáš Valenta
Browse files

add description to candidates

parent 44a9ba1e
Branches
No related tags found
2 merge requests!899Release,!889Add descriptions to candidates
# Generated by Django 4.1.10 on 2024-01-18 11:26
from django.db import migrations
import wagtail.fields
class Migration(migrations.Migration):
dependencies = [
('elections', '0010_alter_electionshomepage_content'),
]
operations = [
migrations.AddField(
model_name='electionscandidatepage',
name='description',
field=wagtail.fields.RichTextField(blank=True, null=True, verbose_name='Popis'),
),
]
......@@ -207,6 +207,7 @@ class ElectionsCandidatePage(
position = models.CharField("Pozice/povolání", max_length=64, blank=True, null=True)
perex = RichTextField()
description = RichTextField("Popis", blank=True, null=True)
email = models.CharField("E-mail", max_length=128, blank=True, null=True)
phone = models.CharField("Telefonní kontakt", max_length=16, blank=True, null=True)
......@@ -232,6 +233,7 @@ class ElectionsCandidatePage(
FieldPanel("image"),
FieldPanel("position"),
FieldPanel("perex"),
FieldPanel("description"),
FieldPanel("email"),
FieldPanel("phone"),
FieldPanel("social_links"),
......
......@@ -4,7 +4,7 @@
{% include 'styleguide2/includes/organisms/layout/elections/navbar.html' with selected_item=page.get_menu_title %}
<main role="main">
{% include 'styleguide2/includes/organisms/header/elections/candidate_header.html' with title=page.title position=page.position perex=page.perex image=page.image email=page.email phone=page.phone social_links=page.social_links %}
{% include 'styleguide2/includes/organisms/header/elections/candidate_header.html' with title=page.title position=page.position perex=page.perex description=page.description image=page.image email=page.email phone=page.phone social_links=page.social_links %}
{% if article_data_list %}
{% include 'styleguide2/includes/organisms/articles/elections/candidate_articles_section.html' with title=page.articles_heading %}
......
<div>
{% if phone or email or social_links %}
<h3
class="
hidden font-alt text-[3.5rem] mb-3
xl:block
"
>Kontakty</h3>
{% endif %}
</div>
<div class="flex flex-col gap-2 text-lg">
......
......@@ -57,6 +57,11 @@
"
>
{{ perex|richtext }}
{% if description %}
<br>
{{ description|richtext }}
{% endif %}
</div>
{% endblock %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment