Add attribute to hide toolbar if needed
authorThierry Florac <thierry.florac@onf.fr>
Wed, 20 May 2015 12:33:19 +0200
changeset 60 b3d22ddef5cc
parent 59 3b9c4d71b30a
child 61 ecc79f7c5957
Add attribute to hide toolbar if needed
src/pyams_skin/templates/table.pt
--- a/src/pyams_skin/templates/table.pt	Wed May 20 12:32:56 2015 +0200
+++ b/src/pyams_skin/templates/table.pt	Wed May 20 12:33:19 2015 +0200
@@ -4,7 +4,9 @@
 			  class="widget-icon"><i tal:attributes="class view.widget_icon_class"></i>
 		</span>
 		<h2 tal:content="view.title"></h2>
-		<tal:var content="structure provider:pyams.toolbar" />
+		<tal:if condition="not:getattr(view,'hide_toolbar',False)">
+			<tal:var content="structure provider:pyams.toolbar" />
+		</tal:if>
 	</header>
 	<div class="widget-body no-padding"
 		 tal:attributes="id view.id">