Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore all content_panels, after which we can decide which to filter out #7884

Merged
merged 1 commit into from
Nov 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 1 addition & 22 deletions network-api/networkapi/mozfest/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class MozfestHomepage(MozfestPrimaryPage):
panel_count = len(parent_panels)
n = panel_count - 1

all_panels = parent_panels[:n] + [
content_panels = parent_panels[:n] + [
FieldPanel('cta_button_label'),
FieldPanel('cta_button_destination'),
FieldPanel('banner_heading'),
Expand All @@ -224,27 +224,6 @@ class MozfestHomepage(MozfestPrimaryPage):
StreamFieldPanel('banner_video'),
] + parent_panels[n:]

if banner_video_type == "hardcoded":
# Hide all the panels that aren't relevant for the video banner version of the MozFest Homepage
content_panels = [
field for field in all_panels
if field.field_name not in [
'banner', 'header', 'intro', 'banner_carousel', 'banner_guide_text', 'banner_cta_label',
'banner_video', 'banner_video_url',
]
]
elif banner_video_type == "featured":
# Hide all the panels that aren't relevant for the video banner version of the MozFest Homepage
content_panels = [
field for field in all_panels
if field.field_name not in [
'banner', 'banner_guide_text', 'banner_video_url', 'cta_button_destination',
'cta_button_label', 'header', 'hero_image', 'intro',
]
]
else:
content_panels = all_panels

# Because we inherit from PrimaryPage, but the "use_wide_template" property does nothing
# we should hide it and make sure we use the right template
settings_panels = Page.settings_panels
Expand Down