WIP 10694-table-block #3
3 changed files with 40 additions and 8 deletions
|
@ -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(
|
||||
[
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue