Updated dashboard template
authorThierry Florac <thierry.florac@onf.fr>
Mon, 11 Sep 2017 14:42:19 +0200
changeset 126 00e660aa11a0
parent 125 ff0be61d49a6
child 127 2b5eeaf6cbbc
Updated dashboard template
src/pyams_content/root/zmi/templates/dashboard.pt
--- a/src/pyams_content/root/zmi/templates/dashboard.pt	Mon Sep 11 14:41:49 2017 +0200
+++ b/src/pyams_content/root/zmi/templates/dashboard.pt	Mon Sep 11 14:42:19 2017 +0200
@@ -1,11 +1,23 @@
-<tal:var define="global dashboard_length 0">
-	<tal:loop repeat="table view.tables">
-		<tal:if condition="table.values">
-			<tal:var content="structure table.render()" />
-			<tal:var define="global dashboard_length dashboard_length + len(table.values)" />
-		</tal:if>
-	</tal:loop>
-	<div tal:condition="not:dashboard_length" class="alert alert-info" i18n:translate="">
-		You are not actually concerned by any content.
+<div class="ams-widget" i18n:domain="pyams_content">
+	<header>
+		<span tal:condition="view.widget_icon_class | nothing"
+			  class="widget-icon"><i tal:attributes="class view.widget_icon_class"></i>
+		</span>
+		<h2 i18n:translate="">Your contents dashboard</h2>
+		<tal:var content="structure provider:pyams.widget_title" />
+		<tal:var content="structure provider:pyams.toolbar" />
+	</header>
+	<div class="widget-body">
+		<tal:var define="global dashboard_length 0">
+			<tal:loop repeat="table view.tables">
+				<tal:if condition="table.values">
+					<tal:var content="structure table.render()" />
+					<tal:var define="global dashboard_length dashboard_length + len(table.values)" />
+				</tal:if>
+			</tal:loop>
+			<div tal:condition="not:dashboard_length" class="alert alert-info" i18n:translate="">
+				You are not actually concerned by any content.
+			</div>
+		</tal:var>
 	</div>
-</tal:var>
+</div>