--- a/src/pyams_content/component/paragraph/zmi/summary.py Thu Sep 21 14:31:04 2017 +0200
+++ b/src/pyams_content/component/paragraph/zmi/summary.py Thu Sep 21 16:06:29 2017 +0200
@@ -58,7 +58,8 @@
def __init__(self, context, request):
super(ParagraphsContainerSummaryView, self).__init__(context, request)
- self.paragraphs = IParagraphContainer(self.context)
+ self.paragraphs = [para for para in IParagraphContainer(self.context).values()
+ if para.visible]
self.languages = II18nManager(self.context).get_languages()
def render_paragraph(self, paragraph, language=None):
--- a/src/pyams_content/component/paragraph/zmi/templates/summary.pt Thu Sep 21 14:31:04 2017 +0200
+++ b/src/pyams_content/component/paragraph/zmi/templates/summary.pt Thu Sep 21 16:06:29 2017 +0200
@@ -1,9 +1,9 @@
<tal:var define="langs view.languages" i18n:domain="pyams_content">
<tal:if condition="len(langs) == 1">
<div class="margin-top-10">
- <tal:loop repeat="paragraph view.paragraphs.values()"
+ <tal:loop repeat="paragraph view.paragraphs"
replace="structure view.render_paragraph(paragraph)" />
- <p tal:condition="not:view.paragraphs.values()"
+ <p tal:condition="not:view.paragraphs"
i18n:translate="">This content doesn't contain any paragraph.</p>
</div>
</tal:if>
@@ -24,9 +24,9 @@
<div tal:define="active python:'active' if repeat['lang'].start() else ''"
tal:attributes="class string:clearfix tab-pane ${active} fade in padding-5;
id string:paragraphs-${lang};">
- <tal:loop repeat="paragraph view.paragraphs.values()"
+ <tal:loop repeat="paragraph view.paragraphs"
replace="structure view.render_paragraph(paragraph, lang)" />
- <p tal:condition="not:view.paragraphs.values()"
+ <p tal:condition="not:view.paragraphs"
i18n:translate="">This content doesn't contain any paragraph.</p>
</div>
</tal:loop>