WIP 10694-table-block #3

Merged
mravi merged 15 commits from 10694-table-block into master 2022-07-12 06:45:55 +00:00
3 changed files with 40 additions and 8 deletions
Showing only changes of commit 3ff5f1eb50 - Show all commits

View file

@ -50,9 +50,32 @@ class ArticleIndexPage(Page):
'intro_en',
)
table_en = TableBlock()
table_fr = TableBlock()
table_de = TableBlock()
table_en = StreamField(
[
('table_en', TableBlock())
],
null=True,
blank = True,
)
table_de = StreamField(
[
('table_de', TableBlock())
],
null=True,
blank = True,
)
table_fr = StreamField(
[
('table_fr', TableBlock())
],
null=True,
blank = True,
)
#table_en = TableBlock()
#table_fr = TableBlock()
#table_de = TableBlock()
trans_table = TranslatedField(
'table_de',
'table_fr',
@ -83,9 +106,9 @@ class ArticleIndexPage(Page):
FieldPanel('intro_fr'),
FieldPanel('title_en'),
FieldPanel('intro_en'),
#FieldPanel('table_en'),
#FieldPanel('table_fr'),
#FieldPanel('table_de'),
FieldPanel('table_en'),
FieldPanel('table_fr'),
FieldPanel('table_de'),
ImageChooserPanel('feed_image'),
MultiFieldPanel(
[

View file

@ -34,6 +34,14 @@
</div>
{% endfor %}
</div>
<!-- Table content -->
<div class="article-table" role="main">
{% for block in page.trans_table %}
{% if block.block_type == 'table_en' or block.block_type == 'table_fr' or block.block_type == 'table_de' %}
{% include_block block %}
{% endif %}
{% endfor %}
</div>
</div><!-- /container -->
</section>

View file

@ -30,11 +30,12 @@
{% endfor %}
</div>
<h1>Mmmm</h1>
<!-- Table content -->
<div class="article-table" role="main">
{% for block in page.trans_table %}
{% elif block.block_type == 'table' %}
{% if block.block_type == 'table' %}
Inside if
{% include_block block %}
{% endif %}
{% endfor %}