diff --git a/elections2021/migrations/0025_elections2021programapppage_info_title.py b/elections2021/migrations/0025_elections2021programapppage_info_title.py new file mode 100644 index 0000000000000000000000000000000000000000..14557b9e36edc780429da83770bff466235ac1ff --- /dev/null +++ b/elections2021/migrations/0025_elections2021programapppage_info_title.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.2 on 2021-05-17 15:24 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("elections2021", "0024_elections2021programpage_head_title"), + ] + + operations = [ + migrations.AddField( + model_name="elections2021programapppage", + name="info_title", + field=models.CharField( + blank=True, + max_length=255, + null=True, + verbose_name="titulek k informacím", + ), + ), + ] diff --git a/elections2021/models.py b/elections2021/models.py index 4ac16689881fa7925eb10fb2b2e00e181e49a038..c7e1f3711b23ff3f02fc7d48d9d5d1dc01cb2427 100644 --- a/elections2021/models.py +++ b/elections2021/models.py @@ -1719,13 +1719,19 @@ class Elections2021QuestionsPage(SubpageMixin, MetadataPageMixin, Page): class Elections2021ProgramAppPage(SubpageMixin, MetadataPageMixin, Page): ### FIELDS + info_title = models.CharField( + "titulek k informacím", blank=True, null=True, max_length=255 + ) info_text = RichTextField( "základní informace", blank=True, null=True, features=RESTRICTED_FEATURES ) ### PANELS - content_panels = Page.content_panels + [FieldPanel("info_text")] + content_panels = Page.content_panels + [ + FieldPanel("info_title"), + FieldPanel("info_text"), + ] promote_panels = [ MultiFieldPanel( diff --git a/elections2021/templates/elections2021/elections2021_home_page.html b/elections2021/templates/elections2021/elections2021_home_page.html index aed0ff8b099ce8d779a97d39f6618d74e47c400d..dc0b7c40cc9dc103905c23648f4a6bd3d3a30613 100644 --- a/elections2021/templates/elections2021/elections2021_home_page.html +++ b/elections2021/templates/elections2021/elections2021_home_page.html @@ -64,7 +64,6 @@ </div> </div> </a> - <p class="mt-5 text-white">Aplikace vám vyselektuje programové <br>body vám na míru</p> </div> </div> </div> diff --git a/elections2021/templates/elections2021/elections2021_program_app_page.html b/elections2021/templates/elections2021/elections2021_program_app_page.html index 631055cdb6fa93797ea1fd37c1d250a2377c9591..02a7cbb00165ec1cca49bc3b2c53c5155520c570 100644 --- a/elections2021/templates/elections2021/elections2021_program_app_page.html +++ b/elections2021/templates/elections2021/elections2021_program_app_page.html @@ -13,13 +13,13 @@ <form method="post"> {% csrf_token %} - {% if page.info_text %} - <div class="grid grid-cols-4 mb-20 md:mb-40"> + {% if page.info_title %} + <div class="grid grid-cols-4 mb-20"> <div class="col-span-4 md:col-span-1"> - <p class="head-xs font-bold">Základní informace</p> + <p class="head-xs font-bold">{{ page.info_title }}</p> </div> - <div class="col-span-4 md:col-span-3 md:pl-16 mt-5 md:mt-0"> - <p class="para">{{ page.info_text|richtext }}</p> + <div class="content-block col-span-4 md:col-span-3 md:pl-16 mt-5 md:mt-0"> + {{ page.info_text|richtext }} </div> </div> {% endif %}