Use TitleFieldPanel for all StrictHierarcy Pages
This commit is contained in:
parent
f398839765
commit
547dc29134
|
|
@ -1,6 +1,6 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.text import slugify
|
from django.utils.text import slugify
|
||||||
from wagtail.admin.panels import FieldPanel
|
from wagtail.admin.panels import FieldPanel, TitleFieldPanel
|
||||||
from wagtail.fields import RichTextField, StreamField
|
from wagtail.fields import RichTextField, StreamField
|
||||||
from wagtail.images.blocks import ImageChooserBlock
|
from wagtail.images.blocks import ImageChooserBlock
|
||||||
|
|
||||||
|
|
@ -110,7 +110,7 @@ class BasicKnowledge(StrictHierarchyPage):
|
||||||
)
|
)
|
||||||
|
|
||||||
content_panels = [
|
content_panels = [
|
||||||
FieldPanel("title", classname="full title"),
|
TitleFieldPanel("title", classname="full title"),
|
||||||
FieldPanel("new_type"),
|
FieldPanel("new_type"),
|
||||||
FieldPanel("intro"),
|
FieldPanel("intro"),
|
||||||
FieldPanel("contents"),
|
FieldPanel("contents"),
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from wagtail.admin.panels import FieldPanel, TabbedInterface, ObjectList
|
from wagtail.admin.panels import TabbedInterface, ObjectList, TitleFieldPanel
|
||||||
|
|
||||||
from core.wagtail_utils import StrictHierarchyPage, get_default_settings
|
from core.wagtail_utils import StrictHierarchyPage, get_default_settings
|
||||||
|
|
||||||
|
|
@ -13,7 +13,7 @@ class Book(StrictHierarchyPage):
|
||||||
verbose_name_plural = 'Bücher'
|
verbose_name_plural = 'Bücher'
|
||||||
|
|
||||||
content_panels = [
|
content_panels = [
|
||||||
FieldPanel('title', classname="full title")
|
TitleFieldPanel('title', classname="full title")
|
||||||
]
|
]
|
||||||
|
|
||||||
edit_handler = TabbedInterface([
|
edit_handler = TabbedInterface([
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from wagtail.admin.panels import FieldPanel, TabbedInterface, ObjectList
|
from wagtail.admin.panels import FieldPanel, TabbedInterface, ObjectList, TitleFieldPanel
|
||||||
|
|
||||||
from core.wagtail_utils import StrictHierarchyPage, get_default_settings
|
from core.wagtail_utils import StrictHierarchyPage, get_default_settings
|
||||||
from users.models import SchoolClass
|
from users.models import SchoolClass
|
||||||
|
|
@ -18,7 +18,7 @@ class Chapter(StrictHierarchyPage, GraphqlNodeMixin):
|
||||||
description = models.TextField(blank=True)
|
description = models.TextField(blank=True)
|
||||||
|
|
||||||
content_panels = [
|
content_panels = [
|
||||||
FieldPanel("title", classname="full title"),
|
TitleFieldPanel("title", classname="full title"),
|
||||||
FieldPanel("description", classname="full description"),
|
FieldPanel("description", classname="full description"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ from wagtail.admin.panels import (
|
||||||
FieldPanel,
|
FieldPanel,
|
||||||
TabbedInterface,
|
TabbedInterface,
|
||||||
ObjectList,
|
ObjectList,
|
||||||
|
TitleFieldPanel,
|
||||||
)
|
)
|
||||||
from wagtail.blocks import StreamBlock
|
from wagtail.blocks import StreamBlock
|
||||||
from wagtail.fields import StreamField
|
from wagtail.fields import StreamField
|
||||||
|
|
@ -140,7 +141,7 @@ class ContentBlock(StrictHierarchyPage, GraphqlNodeMixin):
|
||||||
type = models.CharField(max_length=100, choices=TYPE_CHOICES, default=NORMAL)
|
type = models.CharField(max_length=100, choices=TYPE_CHOICES, default=NORMAL)
|
||||||
|
|
||||||
content_panels = [
|
content_panels = [
|
||||||
FieldPanel("title", classname="full title"),
|
TitleFieldPanel("title", classname="full title"),
|
||||||
FieldPanel("type"),
|
FieldPanel("type"),
|
||||||
FieldPanel("contents"),
|
FieldPanel("contents"),
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from wagtail.admin.panels import FieldPanel, TabbedInterface, ObjectList
|
from wagtail.admin.panels import FieldPanel, TabbedInterface, ObjectList, TitleFieldPanel
|
||||||
from wagtail.fields import RichTextField
|
from wagtail.fields import RichTextField
|
||||||
|
|
||||||
from core.constants import DEFAULT_RICH_TEXT_FEATURES
|
from core.constants import DEFAULT_RICH_TEXT_FEATURES
|
||||||
|
|
@ -22,7 +22,7 @@ class Topic(StrictHierarchyPage):
|
||||||
instructions = models.CharField(max_length=255, blank=True, null=True, default=None)
|
instructions = models.CharField(max_length=255, blank=True, null=True, default=None)
|
||||||
|
|
||||||
content_panels = [
|
content_panels = [
|
||||||
FieldPanel('title', classname="full title"),
|
TitleFieldPanel('title', classname="full title"),
|
||||||
FieldPanel('order'),
|
FieldPanel('order'),
|
||||||
FieldPanel('teaser'),
|
FieldPanel('teaser'),
|
||||||
FieldPanel('vimeo_id'),
|
FieldPanel('vimeo_id'),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue