Added optional table property to hide table's body toolbar
authorThierry Florac <thierry.florac@onf.fr>
Tue, 30 Jun 2015 14:55:26 +0200
changeset 71 8f7451655742
parent 70 6f485755365f
child 72 13f5fdd06484
Added optional table property to hide table's body toolbar
src/pyams_skin/templates/table.pt
--- a/src/pyams_skin/templates/table.pt	Wed Jun 17 10:00:35 2015 +0200
+++ b/src/pyams_skin/templates/table.pt	Tue Jun 30 14:55:26 2015 +0200
@@ -10,7 +10,9 @@
 		</tal:if>
 	</header>
 	<div class="widget-body no-padding"
-		 tal:attributes="id view.id">
+		 tal:define="hide_toolbar getattr(view, 'hide_body_toolbar', False)"
+		 tal:attributes="id view.id;
+						 class python:'widget-body no-padding {0}'.format('no-widget-toolbar' if hide_toolbar else '');">
 		<div class="widget-body-toolbar"></div>
 		<tal:var content="structure view.renderTable()" />
 	</div>