Skip to content
Snippets Groups Projects
Commit ba2db26a authored by Alexa Valentová's avatar Alexa Valentová
Browse files

hide other party when there is no party defined, minor fixes

parent 248ef829
No related branches found
No related tags found
2 merge requests!999Release,!998Release
......@@ -125,15 +125,6 @@ class DistrictHomePage(CalendarMixin, MainHomePageMixin):
"Text tlačítka kalendáře", max_length=256, default="Kalendář"
)
gdpr_and_cookies_page = models.ForeignKey(
# Keep this a reference to the main website's GDPR page. Not ideal, but works (for now).
"main.MainSimplePage",
verbose_name="Stránka pro GDPR",
on_delete=models.PROTECT,
blank=True,
null=True,
)
# --- END New fields ---
# Extra komentar v paticce
......@@ -170,6 +161,10 @@ class DistrictHomePage(CalendarMixin, MainHomePageMixin):
### EDIT HANDLERS
settings_panels = [
FieldPanel("matomo_id"),
]
edit_handler = TabbedInterface(
[
ObjectList(MainHomePageMixin.content_panels, heading="Obsah"),
......@@ -201,6 +196,12 @@ class DistrictHomePage(CalendarMixin, MainHomePageMixin):
class Meta:
verbose_name = "Oblastní sdružení"
@property
def gdpr_and_cookies_page(self):
from main.models import MainHomePage
return MainHomePage.objects.first().gdpr_and_cookies_page
@property
def articles_page_model(self):
return DistrictArticlesPage
......
......@@ -1492,7 +1492,7 @@ class MainArticlePageMixin(
### BEGIN Panels
content_panels = [
content_panels = Page.content_panels + [
FieldPanel("timestamp"),
FieldPanel("perex"),
FieldPanel("content"),
......
......@@ -74,7 +74,10 @@ class PersonContactBlock(StructBlock):
position = CharBlock(label="Název pozice", required=False)
person = PageChooserBlock(
label="Osoba",
page_type=["uniweb.UniwebPersonPage"],
page_type=[
"uniweb.UniwebPersonPage",
"district.DistrictPersonPage",
],
)
class Meta:
......
......@@ -205,6 +205,7 @@ class MenuItemBlock(blocks.StructBlock):
"uniweb.UniwebPeoplePage",
"uniweb.UniwebPersonPage",
"uniweb.UniwebPdfPage",
"district.DistrictPersonPage",
],
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment