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
3c2ff385
Commit
3c2ff385
authored
1 year ago
by
Alexa Valentová
Browse files
Options
Downloads
Patches
Plain Diff
WIP - alignable table block
parent
60e5b387
Branches
Branches containing commit
No related tags found
2 merge requests
!948
Release
,
!940
Aligned tables, PirSTAN GDPR from main page
Pipeline
#17212
passed
1 year ago
Stage: build
Changes
3
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
uniweb/blocks.py
+13
-1
13 additions, 1 deletion
uniweb/blocks.py
uniweb/migrations/0057_alter_uniwebflexiblepage_content_and_more.py
+44
-0
44 additions, 0 deletions
...rations/0057_alter_uniwebflexiblepage_content_and_more.py
uniweb/models.py
+2
-3
2 additions, 3 deletions
uniweb/models.py
with
59 additions
and
4 deletions
uniweb/blocks.py
+
13
−
1
View file @
3c2ff385
from
wagtail.blocks
import
CharBlock
,
ListBlock
,
PageChooserBlock
,
StructBlock
,
URLBlock
from
wagtail.blocks
import
CharBlock
,
ListBlock
,
PageChooserBlock
,
StructBlock
,
URLBlock
,
ChoiceBlock
from
wagtail.contrib.table_block.blocks
import
TableBlock
as
ContribTableBlock
class
AlignedTableBlock
(
ContribTableBlock
):
alignment
=
ChoiceBlock
(
choices
=
[
(
"
left
"
,
"
Vlevo
"
),
(
"
center
"
,
"
Vprostřed
"
),
(
"
right
"
,
"
Vpravo
"
),
],
default
=
"
left
"
,
)
class
PersonUrlBlock
(
StructBlock
):
class
PersonUrlBlock
(
StructBlock
):
...
...
This diff is collapsed.
Click to expand it.
uniweb/migrations/0057_alter_uniwebflexiblepage_content_and_more.py
0 → 100644
+
44
−
0
View file @
3c2ff385
This diff is collapsed.
Click to expand it.
uniweb/models.py
+
2
−
3
View file @
3c2ff385
...
@@ -19,7 +19,6 @@ from wagtail.admin.panels import (
...
@@ -19,7 +19,6 @@ from wagtail.admin.panels import (
from
wagtail.contrib.forms.models
import
AbstractForm
,
AbstractFormField
from
wagtail.contrib.forms.models
import
AbstractForm
,
AbstractFormField
from
wagtail.contrib.forms.panels
import
FormSubmissionsPanel
from
wagtail.contrib.forms.panels
import
FormSubmissionsPanel
from
wagtail.contrib.routable_page.models
import
RoutablePageMixin
,
route
from
wagtail.contrib.routable_page.models
import
RoutablePageMixin
,
route
from
wagtail.contrib.table_block.blocks
import
TableBlock
from
wagtail.fields
import
RichTextField
,
StreamField
from
wagtail.fields
import
RichTextField
,
StreamField
from
wagtail.images.blocks
import
ImageChooserBlock
from
wagtail.images.blocks
import
ImageChooserBlock
from
wagtail.models
import
Page
from
wagtail.models
import
Page
...
@@ -42,7 +41,7 @@ from shared.models import (
...
@@ -42,7 +41,7 @@ from shared.models import (
from
shared.utils
import
make_promote_panels
,
strip_all_html_tags
,
trim_to_length
from
shared.utils
import
make_promote_panels
,
strip_all_html_tags
,
trim_to_length
from
tuning
import
admin_help
from
tuning
import
admin_help
from
.blocks
import
PeopleGroupListBlock
,
PersonUrlBlock
from
.blocks
import
PeopleGroupListBlock
,
PersonUrlBlock
,
AlignedTableBlock
from
.constants
import
(
from
.constants
import
(
ALIGN_CHOICES
,
ALIGN_CHOICES
,
ALIGN_CSS
,
ALIGN_CSS
,
...
@@ -307,7 +306,7 @@ CONTENT_STREAM_BLOCKS = [
...
@@ -307,7 +306,7 @@ CONTENT_STREAM_BLOCKS = [
(
"
picture_list
"
,
PictureListBlock
()),
(
"
picture_list
"
,
PictureListBlock
()),
(
(
"
table
"
,
"
table
"
,
TableBlock
(
Aligned
TableBlock
(
label
=
"
tabulka
"
,
label
=
"
tabulka
"
,
group
=
"
ostatní
"
,
group
=
"
ostatní
"
,
template
=
"
uniweb/blocks/table.html
"
,
template
=
"
uniweb/blocks/table.html
"
,
...
...
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