Add optional 'widget_class' attribute to tables
authorThierry Florac <thierry.florac@onf.fr>
Fri, 10 Nov 2017 13:35:14 +0100
changeset 236 5556af09920b
parent 235 fd00152fd336
child 237 c6c8af288ad3
Add optional 'widget_class' attribute to tables
src/pyams_skin/templates/table.pt
--- a/src/pyams_skin/templates/table.pt	Fri Nov 10 13:32:41 2017 +0100
+++ b/src/pyams_skin/templates/table.pt	Fri Nov 10 13:35:14 2017 +0100
@@ -1,4 +1,6 @@
-<div class="ams-widget" tal:attributes="data-ams-data extension:object_data(view)">
+<div class="ams-widget"
+	 tal:attributes="class view.widget_class | default;
+					 data-ams-data extension:object_data(view);">
 	<header tal:condition="not:getattr(view,'hide_header',False)">
 		<span tal:condition="view.widget_icon_class | nothing"
 			  class="widget-icon"><i tal:attributes="class view.widget_icon_class"></i>