Added condition on item header into site summary portlets renderers
authorThierry Florac <thierry.florac@onf.fr>
Mon, 18 Mar 2019 11:58:14 +0100
changeset 428 c9980dd1edc0
parent 427 e2f6233f9185
child 429 69ad6c6f8ec6
Added condition on item header into site summary portlets renderers
src/pyams_default_theme/shared/site/portlet/templates/site-panels-vertical.pt
src/pyams_default_theme/shared/site/portlet/templates/site-panels.pt
src/pyams_default_theme/shared/site/portlet/templates/site-summary.pt
--- a/src/pyams_default_theme/shared/site/portlet/templates/site-panels-vertical.pt	Mon Mar 18 11:57:49 2019 +0100
+++ b/src/pyams_default_theme/shared/site/portlet/templates/site-panels-vertical.pt	Mon Mar 18 11:58:14 2019 +0100
@@ -23,7 +23,9 @@
 					<a href="${target}">
 						<h3>${item.title}</h3>
 					</a>
-					<div class="header">${structure:tales:html(item.header)}</div>
+					<div class="header"
+						 tal:define="header item.header"
+						 tal:condition="header">${structure:tales:html(header)}</div>
 					<div class="action">
 						<a tal:condition="button_title"
 						   class="btn btn-default"
--- a/src/pyams_default_theme/shared/site/portlet/templates/site-panels.pt	Mon Mar 18 11:57:49 2019 +0100
+++ b/src/pyams_default_theme/shared/site/portlet/templates/site-panels.pt	Mon Mar 18 11:58:14 2019 +0100
@@ -23,7 +23,9 @@
 					<a href="${target}">
 						<h3>${item.title}</h3>
 					</a>
-					<div class="header">${structure:tales:html(item.header)}</div>
+					<div class="header"
+						 tal:define="header item.header"
+						 tal:condition="header">${structure:tales:html(header)}</div>
 					<div class="action">
 						<a tal:condition="button_title"
 						   class="btn btn-default"
--- a/src/pyams_default_theme/shared/site/portlet/templates/site-summary.pt	Mon Mar 18 11:57:49 2019 +0100
+++ b/src/pyams_default_theme/shared/site/portlet/templates/site-summary.pt	Mon Mar 18 11:58:14 2019 +0100
@@ -22,7 +22,9 @@
 					<a href="${target}">
 						<h3>${item.title}</h3>
 					</a>
-					<div class="header">${structure:tales:html(item.header)}</div>
+					<div class="header"
+						 tal:define="header item.header"
+						 tal:condition="header">${structure:tales:html(header)}</div>
 					<div class="action">
 						<a tal:condition="button_title"
 						   class="btn btn-default"