class WhyInvestInTheUKPagePanels: content_panels = [ MultiFieldPanel( heading="Hero and Intro", classname='collapsible', children=[ FieldPanel('title'), ImageChooserPanel('hero_image'), MediaChooserPanel('hero_video'), FieldPanel('strapline'), FieldPanel('introduction'), ImageChooserPanel('intro_image'), ], ), MultiFieldPanel( heading="UK Strengths", classname='collapsible', children=[ FieldPanel('uk_strength_title'), FieldPanel('uk_strength_intro'), StreamFieldPanel('uk_strength_panels'), ], ), SearchEngineOptimisationPanel() ] settings_panels = [ FieldPanel('slug'), ] edit_handler = make_translated_interface(content_panels=content_panels, settings_panels=settings_panels)
class AboutUkRegionListingPagePanels: image_panels = [ ImageChooserPanel('hero_image'), MediaChooserPanel('hero_video') ] content_panels = [ FieldPanel('title'), FieldPanel('breadcrumbs_label'), MultiFieldPanel( heading="Hero", children=[ FieldPanel('hero_title'), ], ), FieldPanel('intro'), MultiFieldPanel(heading="Contact us section", classname="collapsible", children=[ FieldPanel('contact_title'), FieldPanel('contact_text'), FieldPanel('contact_cta_text'), FieldPanel('contact_cta_link'), ]), MultiFieldPanel( heading="Explore more of the Investment Atlas section", classname="collapsible", children=[ PageChooserPanel('related_page_one', [ 'great_international.WhyInvestInTheUKPage', 'great_international.InternationalTopicLandingPage', 'great_international.AboutUkRegionPage', 'great_international.InvestmentOpportunityPage' ]), PageChooserPanel('related_page_two', [ 'great_international.WhyInvestInTheUKPage', 'great_international.InternationalTopicLandingPage', 'great_international.AboutUkRegionPage', 'great_international.InvestmentOpportunityPage' ]), PageChooserPanel('related_page_three', [ 'great_international.WhyInvestInTheUKPage', 'great_international.InternationalTopicLandingPage', 'great_international.AboutUkRegionPage', 'great_international.InvestmentOpportunityPage' ]), ]), SearchEngineOptimisationPanel() ] settings_panels = [ FieldPanel('slug'), ] edit_handler = make_translated_interface(content_panels=content_panels, settings_panels=settings_panels, other_panels=[ ObjectList(image_panels, heading='Images'), ])
class ForeignDirectInvestmentFormSuccessPagePanels: content_panels = [ FieldPanel('breadcrumbs_label'), MultiFieldPanel(heading='heading', children=[ FieldPanel('heading'), FieldPanel('sub_heading'), ]), MultiFieldPanel(heading='Next steps', children=[ FieldPanel('next_steps_title'), FieldPanel('next_steps_body'), ]), MultiFieldPanel(heading='Documents', children=[ FieldPanel('documents_title'), FieldPanel('documents_body'), ]), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ]
class SectorLandingPage(ExclusivePageMixin, BaseInvestPage): subpage_types = ['invest.sectorPage'] slug_identity = slugs.INVEST_SECTOR_LANDING_PAGE slug_override = 'industries' # page fields heading = models.CharField(max_length=255) hero_image = models.ForeignKey('wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+') image_panels = [ ImageChooserPanel('hero_image'), ] content_panels = [FieldPanel('heading'), SearchEngineOptimisationPanel()] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ] edit_handler = make_translated_interface(content_panels=content_panels, settings_panels=settings_panels, other_panels=[ ObjectList(image_panels, heading='Images'), ])
class SetupGuideLandingPage(ExclusivePageMixin, BasePage): service_name_value = cms.INVEST subpage_types = ['invest.SetupGuidePage'] slug_identity = cms.INVEST_GUIDE_LANDING_PAGE_SLUG view_path = 'setup-guide-landing/' # page fields heading = models.CharField(max_length=255) sub_heading = models.CharField(max_length=255) lead_in = models.TextField(blank=True) content_panels = [ FieldPanel('heading'), FieldPanel('sub_heading'), FieldPanel('lead_in'), SearchEngineOptimisationPanel() ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ] edit_handler = make_translated_interface( content_panels=content_panels, settings_panels=settings_panels, )
class HomePage(ExclusivePageMixin, BasePage): service_name_value = cms.EXPORT_READINESS slug_identity = cms.GREAT_HOME_SLUG subpage_types = [ 'export_readiness.TopicLandingPage', 'export_readiness.ArticleListingPage', 'export_readiness.ArticlePage' ] banner_content = MarkdownField() banner_label = models.CharField(max_length=50, null=True, blank=True) news_title = models.CharField(max_length=255) news_description = MarkdownField() content_panels = [ MultiFieldPanel(heading='EU Exit banner', children=[ FieldPanel('banner_label'), FieldPanel('banner_content'), ]), MultiFieldPanel(heading='EU exit news', children=[ FieldPanel('news_title'), FieldPanel('news_description') ]), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ]
class TopicLandingPage(BasePage): service_name_value = cms.EXPORT_READINESS subpage_types = [ 'export_readiness.ArticleListingPage', 'export_readiness.SuperregionPage', ] landing_page_title = models.CharField(max_length=255) hero_image = models.ForeignKey('wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+') hero_teaser = models.CharField(max_length=255, null=True, blank=True) content_panels = [ FieldPanel('landing_page_title'), MultiFieldPanel(heading='Hero', children=[ ImageChooserPanel('hero_image'), FieldPanel('hero_teaser') ]), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ]
class RegionLandingPage(ExclusivePageMixin, BasePage): service_name_value = cms.INVEST subpage_types = ['invest.sectorPage'] slug_identity = cms.INVEST_UK_REGION_LANDING_PAGE_SLUG view_path = 'uk-regions/' # page fields heading = models.CharField(max_length=255) hero_image = models.ForeignKey('wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+') image_panels = [ ImageChooserPanel('hero_image'), ] content_panels = [FieldPanel('heading'), SearchEngineOptimisationPanel()] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ] edit_handler = make_translated_interface(content_panels=content_panels, settings_panels=settings_panels, other_panels=[ ObjectList(image_panels, heading='Images'), ])
class SetupGuideLandingPage(ExclusivePageMixin, BaseInvestPage): subpage_types = ['invest.SetupGuidePage'] slug_identity = slugs.INVEST_GUIDE_LANDING_PAGE # override the slug when generating the url slug_override = 'uk-setup-guide' # page fields heading = models.CharField(max_length=255) sub_heading = models.CharField(max_length=255) lead_in = models.TextField(blank=True) content_panels = [ FieldPanel('heading'), FieldPanel('sub_heading'), FieldPanel('lead_in'), SearchEngineOptimisationPanel() ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ] edit_handler = make_translated_interface( content_panels=content_panels, settings_panels=settings_panels, )
class InternationalTradeIndustryContactPagePanels: content_panels = [ FieldPanel('title'), MultiFieldPanel(heading='Contact form', children=[ FieldPanel('breadcrumbs_label'), FieldPanel('introduction_text'), FieldPanel('submit_button_text'), ]), MultiFieldPanel(heading='Success page', children=[ FieldPanel('success_message_text'), FieldPanel('success_back_link_text'), ]), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('slug'), ] edit_handler = make_translated_interface( content_panels=content_panels, settings_panels=settings_panels, )
class InternationalTopicLandingPage(BasePage): service_name_value = cms.GREAT_INTERNATIONAL parent_page_types = ['great_international.GreatInternationalApp'] subpage_types = [ 'great_international.InternationalArticleListingPage', 'great_international.InternationalCampaignPage', 'great_international.InternationalGuideLandingPage', 'great_international.InternationalSectorPage', ] landing_page_title = models.CharField(max_length=255) hero_image = models.ForeignKey('wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+') hero_teaser = models.CharField(max_length=255, null=True, blank=True) tags = ParentalManyToManyField(Tag, blank=True) content_panels = [ FieldPanel('landing_page_title'), MultiFieldPanel(heading='Hero', children=[ ImageChooserPanel('hero_image'), FieldPanel('hero_teaser') ]), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), FieldPanel('tags', widget=CheckboxSelectMultiple) ]
class IndustryArticlePage(BaseFASPage): view_path = 'industry-articles/' breadcrumbs_label = models.CharField(max_length=50) introduction_title = models.CharField(max_length=255) body = MarkdownField(blank=True) author_name = models.CharField(max_length=255) job_title = models.CharField(max_length=255) proposition_text = models.CharField(max_length=255) call_to_action_text = models.CharField(max_length=500) show_table_of_content = models.BooleanField( default=False, help_text=( 'Any H2 in the body will be listed in the table of content. ' 'Allows users to click to go to sections of the page. Useful for ' 'long articles.')) back_to_home_link_text = models.CharField(max_length=100) social_share_title = models.CharField(max_length=100) date = models.DateField() content_panels = [ FieldPanel('breadcrumbs_label'), MultiFieldPanel( heading='Contact us', children=[ FieldPanel('proposition_text'), FieldPanel('call_to_action_text'), ], classname='collapsible', ), MultiFieldPanel(heading='Article', children=[ FieldPanel('introduction_title'), FieldPanel('body'), ]), MultiFieldPanel(heading='Author', children=[ FieldPanel('author_name'), FieldPanel('job_title'), FieldPanel('date'), ]), MultiFieldPanel(heading='Footer', children=[ FieldPanel('back_to_home_link_text'), FieldPanel('social_share_title'), ]), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), MultiFieldPanel(heading='Page structure', children=[FieldPanel('show_table_of_content')]) ] edit_handler = make_translated_interface(content_panels=content_panels, settings_panels=settings_panels)
class IndustryLandingPage(ExclusivePageMixin, BreadcrumbMixin, BaseFASPage): slug_identity = slugs.FIND_A_SUPPLIER_INDUSTRY_LANDING slug_override = 'industries' subpage_types = [ 'find_a_supplier.IndustryContactPage', 'find_a_supplier.IndustryPage', ] hero_image = models.ForeignKey('wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+') mobile_hero_image = models.ForeignKey('wagtailimages.Image', null=True, blank=True, on_delete=models.SET_NULL, related_name='+') hero_image_caption = models.CharField(max_length=255, blank=True) breadcrumbs_label = models.CharField(max_length=50) hero_title = models.CharField(max_length=500) proposition_text = models.CharField(max_length=500) call_to_action_text = models.CharField(max_length=500) more_industries_title = models.CharField(max_length=100) image_panels = [ ImageChooserPanel('hero_image'), ImageChooserPanel('mobile_hero_image'), ] content_panels = [ FieldPanel('breadcrumbs_label'), FieldPanel('hero_title'), FieldPanel('hero_image_caption'), MultiFieldPanel(heading='Contact us', children=[ FieldRowPanel(children=[ FieldPanel('proposition_text'), FieldPanel('call_to_action_text'), ], classname='full field-row-panel'), ]), FieldPanel('more_industries_title'), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ] edit_handler = make_translated_interface(content_panels=content_panels, settings_panels=settings_panels, other_panels=[ ObjectList(image_panels, heading='Images'), ])
class InternationalTopicLandingPagePanels: content_panels = [ FieldPanel('title'), FieldPanel('landing_page_title'), MultiFieldPanel(heading='Hero content', children=[ ImageChooserPanel('hero_image'), MediaChooserPanel('hero_video'), FieldPanel('hero_teaser') ]), MultiFieldPanel( heading="Explore more of the Investment Atlas section", classname="collapsible", children=[ PageChooserPanel('related_page_one', [ 'great_international.WhyInvestInTheUKPage', 'great_international.AboutUkRegionPage', 'great_international.InvestmentOpportunityPage', 'great_international.InvestmentGeneralContentPage', 'great_international.AboutUkRegionListingPage', 'great_international.InvestmentOpportunityListingPage' ]), PageChooserPanel('related_page_two', [ 'great_international.WhyInvestInTheUKPage', 'great_international.AboutUkRegionPage', 'great_international.InvestmentOpportunityPage', 'great_international.InvestmentGeneralContentPage', 'great_international.AboutUkRegionListingPage', 'great_international.InvestmentOpportunityListingPage' ]), PageChooserPanel('related_page_three', [ 'great_international.WhyInvestInTheUKPage', 'great_international.AboutUkRegionPage', 'great_international.InvestmentOpportunityPage', 'great_international.InvestmentGeneralContentPage', 'great_international.AboutUkRegionListingPage', 'great_international.InvestmentOpportunityListingPage' ]), ]), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('slug'), FieldPanel('tags', widget=CheckboxSelectMultiple) ] edit_handler = make_translated_interface(content_panels=content_panels, settings_panels=settings_panels)
class HighPotentialOpportunityFormSuccessPage(BasePage): service_name_value = cms.INVEST view_path = 'high-potential-opportunities/rail/contact/' slug_identity = cms.INVEST_HIGH_POTENTIAL_OPPORTUNITY_FORM_SUCCESS_SLUG breadcrumbs_label = models.CharField(max_length=50) heading = models.CharField(max_length=255, verbose_name='section title') sub_heading = models.CharField( max_length=255, verbose_name='section body', ) next_steps_title = models.CharField(max_length=255, verbose_name='section title') next_steps_body = models.CharField( max_length=255, verbose_name='section body', ) documents_title = models.CharField(max_length=255, verbose_name='section title') documents_body = models.CharField( max_length=255, verbose_name='section body', ) content_panels = [ FieldPanel('breadcrumbs_label'), MultiFieldPanel(heading='heading', children=[ FieldPanel('heading'), FieldPanel('sub_heading'), ]), MultiFieldPanel(heading='Next steps', children=[ FieldPanel('next_steps_title'), FieldPanel('next_steps_body'), ]), MultiFieldPanel(heading='Documents', children=[ FieldPanel('documents_title'), FieldPanel('documents_body'), ]), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ]
class ForeignDirectInvestmentFormPagePanels: content_panels_before_form = [ MultiFieldPanel(heading='Hero', children=[ FieldPanel('breadcrumbs_label'), FieldPanel('heading'), FieldPanel('sub_heading'), ]), ] content_panels_after_form = [SearchEngineOptimisationPanel()] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ]
class InfoPage(BaseInvestPage): """ Markdown page - used for terms and conditions and privacy policy """ view_path = 'info/' content = MarkdownField() content_panels = [FieldPanel('content'), SearchEngineOptimisationPanel()] settings_panels = [FieldPanel('title_en_gb'), FieldPanel('slug')] edit_handler = make_translated_interface( content_panels=content_panels, settings_panels=settings_panels, )
class InternationalHomePagePanels: content_panels = [ FieldPanel('title'), FieldPanel('hero_title'), MediaChooserPanel('hero_video'), StreamFieldPanel('homepage_link_panels'), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('slug'), ] edit_handler = make_translated_interface(content_panels=content_panels, settings_panels=settings_panels)
class InternationalLandingPage(ExclusivePageMixin, BasePage): service_name_value = cms.EXPORT_READINESS slug_identity = cms.GREAT_HOME_INTERNATIONAL_SLUG subpage_types = [ 'export_readiness.ArticleListingPage', ] content_panels = [SearchEngineOptimisationPanel()] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ] @property def articles_count(self): return sum((listing_page.specific.articles_count for listing_page in self.get_descendants().type(ArticleListingPage).live()))
class CapitalInvestContactFormPagePanels: content_panels = [ FieldPanel('title'), FieldPanel('breadcrumbs_label'), FieldPanel('heading'), FieldPanel('intro'), FieldPanel('comment'), FieldPanel('cta_text'), SearchEngineOptimisationPanel() ] settings_panels = [ FieldPanel('slug'), ] edit_handler = make_translated_interface( content_panels=content_panels, settings_panels=settings_panels, )
class EUExitInternationalFormPage(ExclusivePageMixin, BasePage, metaclass=FormPageMetaClass): # metaclass creates <fild_name>_label and <field_name>_help_text form_field_names = [ 'first_name', 'last_name', 'email', 'organisation_type', 'company_name', 'country', 'city', 'comment', ] service_name_value = cms.EXPORT_READINESS view_path = 'international/eu-exit-news/contact/' slug_identity = cms.GREAT_EUEXIT_INTERNATIONAL_FORM_SLUG breadcrumbs_label = models.CharField(max_length=50) heading = models.CharField(max_length=255) body_text = MarkdownField() submit_button_text = models.CharField(max_length=50) disclaimer = models.TextField(max_length=500) content_panels_before_form = [ MultiFieldPanel(heading='Hero', children=[ FieldPanel('breadcrumbs_label'), FieldPanel('heading'), FieldPanel('body_text'), ]), ] content_panels_after_form = [ FieldPanel('disclaimer', widget=Textarea), FieldPanel('submit_button_text'), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ]
class TermsAndConditionsPage(ExclusivePageMixin, BasePage): service_name_value = cms.EXPORT_READINESS view_path = 'terms-and-conditions/' slug_identity = cms.GREAT_TERMS_AND_CONDITIONS_SLUG body = MarkdownField(blank=False) content_panels = [ MultiFieldPanel(heading='Terms and conditions', children=[ FieldPanel('body'), ]), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ]
class InternationalEUExitFormPagePanels: content_panels_before_form = [ MultiFieldPanel(heading='Hero', children=[ FieldPanel('breadcrumbs_label'), FieldPanel('heading'), FieldPanel('body_text'), ]), ] content_panels_after_form = [ FieldPanel('disclaimer', widget=Textarea), FieldPanel('submit_button_text'), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ]
class InternationalArticleListingPagePanels: content_panels = [ FieldPanel('title'), FieldPanel('landing_page_title'), MultiFieldPanel(heading='Hero', children=[ ImageChooserPanel('hero_image'), FieldPanel('hero_teaser') ]), FieldPanel('list_teaser'), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('slug'), FieldPanel('tags', widget=CheckboxSelectMultiple) ] edit_handler = make_translated_interface(content_panels=content_panels, settings_panels=settings_panels)
class InternationalEUExitFormSuccessPagePanels: content_panels = [ FieldPanel('breadcrumbs_label'), MultiFieldPanel(heading='heading', children=[ FieldPanel('heading'), FieldPanel('body_text'), ]), MultiFieldPanel(heading='Next steps', children=[ FieldPanel('next_title'), FieldPanel('next_body_text'), ]), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ]
class HighPotentialOpportunityFormPage(ExclusivePageMixin, BasePage, metaclass=FormPageMetaClass): # metaclass creates <fild_name>_label and <field_name>_help_text form_field_names = [ 'full_name', 'role_in_company', 'email_address', 'phone_number', 'company_name', 'website_url', 'country', 'company_size', 'opportunities', 'comment', ] service_name_value = cms.INVEST view_path = 'high-potential-opportunities/rail/contact/' slug_identity = cms.INVEST_HIGH_POTENTIAL_OPPORTUNITY_FORM_SLUG heading = models.CharField(max_length=255) sub_heading = models.CharField(max_length=255) breadcrumbs_label = models.CharField(max_length=50) content_panels_before_form = [ MultiFieldPanel(heading='Hero', children=[ FieldPanel('breadcrumbs_label'), FieldPanel('heading'), FieldPanel('sub_heading'), ]), ] content_panels_after_form = [SearchEngineOptimisationPanel()] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ]
class PrivacyAndCookiesPage(BasePage): service_name_value = cms.EXPORT_READINESS subpage_types = ['export_readiness.PrivacyAndCookiesPage'] view_path = 'privacy-and-cookies/' body = MarkdownField(blank=False) content_panels = [ MultiFieldPanel(heading='Privacy and cookies', children=[ FieldPanel('body'), ]), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('title_en_gb'), FieldPanel('slug'), ] promote_panels = []
class InvestmentGeneralContentPagePanels: content_panels = [ MultiFieldPanel( heading="Hero and Intro", classname='collapsible', children=[ FieldPanel('title'), ImageChooserPanel('hero_image'), MediaChooserPanel('hero_video'), FieldPanel('strapline'), FieldPanel('introduction'), ImageChooserPanel('intro_image'), ], ), StreamFieldPanel('main_content'), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('slug'), ] edit_handler = make_translated_interface(content_panels=content_panels, settings_panels=settings_panels)
class InternationalArticlePagePanels: content_panels = [ FieldPanel('title'), FieldPanel('article_title'), MultiFieldPanel(heading='Article content', children=[ FieldPanel('article_subheading'), FieldPanel('article_teaser'), FieldPanel('article_body_text') ]), MultiFieldPanel(heading='CTA fields', children=[ FieldPanel('cta_title'), FieldPanel('cta_teaser'), FieldPanel('cta_link_label'), FieldPanel('cta_link'), ]), SearchEngineOptimisationPanel(), ] image_panels = [ ImageChooserPanel('article_image'), FieldPanel('article_video', widget=AdminMediaChooser), ] settings_panels = [ FieldPanel('type_of_article', widget=Select), FieldPanel('slug'), FieldPanel('tags', widget=CheckboxSelectMultiple) ] edit_handler = make_translated_interface( content_panels=content_panels, settings_panels=settings_panels, other_panels=[ObjectList(image_panels, heading='Images')], )
class InvestmentOpportunityListingPagePanels: content_panels = [ MultiFieldPanel( heading='Opportunity Listing Page Title', children=[ FieldPanel('title'), FieldPanel('search_results_title'), FieldPanel('breadcrumbs_label'), ], ), MultiFieldPanel( heading='Hero content', children=[ MediaChooserPanel('hero_video'), FieldPanel('hero_text'), ], ), MultiFieldPanel( heading='CTA content', children=[ FieldPanel('contact_cta_title'), FieldPanel('contact_cta_text'), FieldPanel('contact_cta_link'), ], ), SearchEngineOptimisationPanel(), ] settings_panels = [ FieldPanel('slug'), ] edit_handler = make_translated_interface( content_panels=content_panels, settings_panels=settings_panels, )