Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maják
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Maják
Commits
e16f2c27
Commit
e16f2c27
authored
2 years ago
by
OndraPetrzilka
Browse files
Options
Downloads
Patches
Plain Diff
MainWorkPage - content_panels, labels in Czech
parent
cac30992
Branches
Branches containing commit
No related tags found
3 merge requests
!607
Pirati.cz
,
!582
Feature/pirati cz ondra
,
!575
Feature/pirati cz
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/blocks.py
+6
-6
6 additions, 6 deletions
main/blocks.py
main/models.py
+14
-2
14 additions, 2 deletions
main/models.py
with
20 additions
and
8 deletions
main/blocks.py
+
6
−
6
View file @
e16f2c27
...
...
@@ -39,18 +39,18 @@ class PeopleGroupBlock(StructBlock):
class
ProgramBlock
(
StructBlock
):
icon
=
ImageChooserBlock
()
title
=
CharBlock
()
text
=
TextBlock
()
icon
=
ImageChooserBlock
(
label
=
"
Ikona
"
)
title
=
CharBlock
(
label
=
"
Titulek článku programu
"
)
text
=
TextBlock
(
label
=
"
Obsah
"
)
class
ProgramGroupBlock
(
StructBlock
):
title
=
CharBlock
()
point_list
=
ListBlock
(
ProgramBlock
())
title
=
CharBlock
(
label
=
"
Titulek části programu
"
)
point_list
=
ListBlock
(
ProgramBlock
()
,
label
=
"
Jednotlivé články programu
"
)
class
TweetsBlock
(
StructBlock
):
title
=
CharBlock
()
title
=
CharBlock
(
label
=
"
Titulek
"
)
# NewsBlock - zatím asi hardcoded
...
...
This diff is collapsed.
Click to expand it.
main/models.py
+
14
−
2
View file @
e16f2c27
...
...
@@ -141,7 +141,7 @@ class MainHomePage(MenuMixin, ExtendedMetadataHomePageMixin, MetadataPageMixin,
class
MainWorkPage
(
ExtendedMetadataPageMixin
,
SubpageMixin
,
MetadataPageMixin
,
Page
):
perex
=
models
.
TextField
()
timeline
=
StreamField
(
[(
"
article_list
"
,
PageChooserBlock
(
page_type
=
"
main.MainArticlePage
"
))],
[(
"
article_list
"
,
PageChooserBlock
(
page_type
=
"
main.MainArticlePage
"
,
label
=
"
Vybrat aktualitu
"
))],
verbose_name
=
"
Timeline
"
,
blank
=
True
,
)
...
...
@@ -151,6 +151,12 @@ class MainWorkPage(ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin, P
parent_page_types
=
[
"
main.MainHomePage
"
]
subpage_types
=
[]
### PANELS
content_panels
=
Page
.
content_panels
+
[
FieldPanel
(
'
perex
'
),
FieldPanel
(
'
timeline
'
)
]
### OTHERS
class
Meta
:
...
...
@@ -241,7 +247,7 @@ class MainProgramPage(ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin
perex
=
models
.
TextField
()
program
=
StreamField
(
[(
"
program_group
"
,
blocks
.
ProgramGroupBlock
())],
[(
"
program_group
"
,
blocks
.
ProgramGroupBlock
(
label
=
"
Část programu
"
))],
verbose_name
=
"
Program
"
,
blank
=
True
,
)
...
...
@@ -309,6 +315,12 @@ class MainPersonPage(ExtendedMetadataPageMixin, SubpageMixin, MetadataPageMixin,
parent_page_types
=
[
"
main.MainPeoplePage
"
]
subpage_types
=
[]
### PANELS
content_panels
=
Page
.
content_panels
+
[
FieldPanel
(
'
perex
'
),
FieldPanel
(
'
text
'
)
]
### OTHERS
class
Meta
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment