Skip to content

Commit

Permalink
DSRC-31: Details (#1697)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs authored Aug 2, 2024
1 parent 0f21478 commit c32a6a7
Show file tree
Hide file tree
Showing 5 changed files with 556 additions and 1 deletion.
3 changes: 2 additions & 1 deletion etna/core/blocks/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .accordion import AccordionsBlock
from .accordion import AccordionsBlock, DetailsBlock
from .base import SectionDepthAwareStructBlock
from .contact import ContactBlock
from .cta import ButtonBlock, CallToActionBlock, LargeCardLinksBlock
Expand Down Expand Up @@ -36,6 +36,7 @@
"ContentImageBlock",
"ContentTableBlock",
"DescriptionListBlock",
"DetailsBlock",
"DocumentsBlock",
"DoDontListBlock",
"FeaturedRecordArticleBlock",
Expand Down
11 changes: 11 additions & 0 deletions etna/core/blocks/accordion.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,14 @@ class Meta:

class AccordionsBlock(blocks.StructBlock):
items = blocks.ListBlock(AccordionBlock())


class DetailsBlock(blocks.StructBlock):
title = blocks.CharBlock(required=True)
body = APIRichTextBlock(
required=True, features=settings.RESTRICTED_RICH_TEXT_FEATURES
)

class Meta:
icon = "terminal"
label = "Details"
2 changes: 2 additions & 0 deletions etna/generic_pages/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
ContentImageBlock,
ContentTableBlock,
DescriptionListBlock,
DetailsBlock,
DocumentsBlock,
DoDontListBlock,
FeaturedRecordArticleBlock,
Expand All @@ -36,6 +37,7 @@ class SectionContentBlock(blocks.StreamBlock):
call_to_action = CallToActionBlock()
contact = ContactBlock()
description_list = DescriptionListBlock()
details = DetailsBlock()
document = DocumentsBlock()
do_dont_list = DoDontListBlock()
featured_record_article = FeaturedRecordArticleBlock()
Expand Down
Loading

0 comments on commit c32a6a7

Please sign in to comment.