From 98df8f7b2f8210c6a0eac8bc76c6b5ae7cd53692 Mon Sep 17 00:00:00 2001 From: Jonas Braathen Date: Sun, 14 Jul 2024 18:32:32 +0200 Subject: [PATCH] move some block labels around --- dnscms/dnscms/blocks.py | 14 ++++++++++---- dnscms/generic/models.py | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dnscms/dnscms/blocks.py b/dnscms/dnscms/blocks.py index d3ea8e1..27fbf43 100644 --- a/dnscms/dnscms/blocks.py +++ b/dnscms/dnscms/blocks.py @@ -38,6 +38,7 @@ class ImageWithTextBlock(blocks.StructBlock): class Meta: icon = "image" + label = "Bilde" @register_streamfield_block @@ -55,6 +56,7 @@ class ImageSliderItemBlock(blocks.StructBlock): class Meta: icon = "image" + label = "Bildegalleri" @register_streamfield_block @@ -91,6 +93,7 @@ class HorizontalRuleBlock(blocks.StructBlock): class Meta: icon = "minus" + label = "Skillelinje" @register_streamfield_block @@ -153,6 +156,7 @@ class FeaturedBlock(blocks.StructBlock): class Meta: icon = "arrow-right-full" + label = "Fremhevet underside" class PageSectionNavigationBlock(blocks.StaticBlock): @@ -193,14 +197,15 @@ class AccordionBlock(blocks.StructBlock): class Meta: icon = "folder-open-1" + label = "Trekkspill" BASE_BLOCKS = [ ("paragraph", blocks.RichTextBlock(label="Rik tekst")), - ("image", ImageWithTextBlock(label="Bilde")), - ("image_slider", ImageSliderBlock(label="Bildegalleri")), - ("horizontal_rule", HorizontalRuleBlock(label="Skillelinje")), - ("featured", FeaturedBlock(label="Fremhevet underside")), + ("image", ImageWithTextBlock()), + ("image_slider", ImageSliderBlock()), + ("horizontal_rule", HorizontalRuleBlock()), + ("featured", FeaturedBlock()), ("page_section_navigation", PageSectionNavigationBlock()), ("accordion", AccordionBlock()), ] @@ -238,3 +243,4 @@ class PageSectionBlock(blocks.StructBlock): class Meta: icon = "folder-open-1" + label = "Seksjon" diff --git a/dnscms/generic/models.py b/dnscms/generic/models.py index 443b31f..ed9a801 100644 --- a/dnscms/generic/models.py +++ b/dnscms/generic/models.py @@ -12,7 +12,7 @@ class GenericPage(Page): show_in_menus = True lead = RichTextField(features=["bold", "italic", "link"]) - body = StreamField(BASE_BLOCKS + [("page_section", PageSectionBlock(label="Seksjon"))]) + body = StreamField(BASE_BLOCKS + [("page_section", PageSectionBlock())]) content_panels = Page.content_panels + [ FieldPanel("lead", heading="Ingress"),