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

fix icon for hoax and 2 column text block, remove richtext from image desc

parent be46a7a8
No related branches found
No related tags found
2 merge requests!732Release,!730Fix icon for hoax and 2 column text block, remove richtext from image desc
Pipeline #11664 passed
......@@ -359,7 +359,7 @@ class TwoTextColumnBlock(StructBlock):
text_column_2 = RichTextBlock(label="Druhý sloupec textu")
class Meta:
icon = "text"
icon = "doc-full"
label = "Text ve dvou sloupcích"
......@@ -376,11 +376,11 @@ class HoaxBlock(StructBlock):
title = CharBlock(label="Titulek")
hoax = RichTextBlock(label="Hoax")
image = ImageChooserBlock(label="Obrázek")
image_explanation = RichTextBlock(label="Popis obrázku", required=False)
image_explanation = CharBlock(label="Popis obrázku", required=False)
reality = RichTextBlock(label="Realita")
class Meta:
icon = "text"
icon = "view"
label = "Hoax"
template = "main/blocks/hoax_block.html"
......
# Generated by Django 4.1.6 on 2023-02-28 10:03
from django.db import migrations
import wagtail.blocks
import wagtail.fields
import wagtail.images.blocks
class Migration(migrations.Migration):
dependencies = [
('main', '0046_alter_mainpeoplepage_options_and_more'),
]
operations = [
migrations.AlterField(
model_name='mainhoaxpage',
name='content',
field=wagtail.fields.StreamField([('hoax', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(label='Titulek')), ('hoax', wagtail.blocks.RichTextBlock(label='Hoax')), ('image', wagtail.images.blocks.ImageChooserBlock(label='Obrázek')), ('image_explanation', wagtail.blocks.CharBlock(label='Popis obrázku', required=False)), ('reality', wagtail.blocks.RichTextBlock(label='Realita'))]))], blank=True, use_json_field=True, verbose_name='Hoaxy a jejich vysvětlení'),
),
]
{% load wagtailimages_tags static %}
{% load wagtailimages_tags wagtailcore_tags static %}
{% image self.image width-800 as img %}
<ui-popout>
......@@ -9,7 +9,7 @@
<div class="flex flex-wrap gap-4 lg:flex-nowrap">
<div class="grow lg:grow-0 lg:basis-2/3 max-w-screen-lg">
<div class="prose max-w-none">
{{ self.hoax }}
{{ self.hoax|richtext }}
</div>
<img
class="mt-10"
......@@ -18,7 +18,7 @@
>
<h3 class="head-2xl mt-10">Jak to je?</h3>
<div class="prose max-w-none">
{{ self.reality }}
{{ self.reality|richtext }}
</div>
</div>
<div class="lg:basis-1/3">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment