Skip to content

Commit

Permalink
🪟 Simplify content_panels (#70)
Browse files Browse the repository at this point in the history
* Simplify exhibit content_panels organization, default collapsed body

* Combine Images into MultiFieldPanel

* Remove double labels
  • Loading branch information
mrharpo committed Oct 20, 2022
1 parent 80e35b9 commit 134b752
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions exhibits/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,17 @@ class ExhibitPage(Page):
]

content_panels = Page.content_panels + [
FieldPanel('body', classname='full'),
FieldPanel('cover_image', classname='full'),
FieldPanel('hero_image', classname='full'),
MultiFieldPanel([InlinePanel('authors', label='Author', heading='Author(s)')]),
MultiFieldPanel(
[
InlinePanel(
MultiFieldPanel([
FieldPanel('cover_image'),
FieldPanel('hero_image'),
], heading='Images'),
FieldPanel('body', classname='collapsed'),
InlinePanel('authors', heading='Author(s)'),
InlinePanel(
'other_exhibits',
label='Other Exhibits',
heading='Other Exhibits',
max_num=3,
)
]
),
]

api_fields = [
Expand Down

0 comments on commit 134b752

Please sign in to comment.