Added TSV export to search results
authorThierry Florac <thierry.florac@onf.fr>
Thu, 20 Dec 2018 14:21:31 +0100
changeset 170 937cb818fcdc
parent 169 e25ea6a1f7a1
child 171 5ed2f996fe37
Added TSV export to search results
src/pyams_form/templates/search.pt
--- a/src/pyams_form/templates/search.pt	Thu Dec 20 14:20:36 2018 +0100
+++ b/src/pyams_form/templates/search.pt	Thu Dec 20 14:21:31 2018 +0100
@@ -1,9 +1,21 @@
-<div id="search-form" data-ams-widget-sortable="false" i18n:domain="pyams_form">
-	<tal:var content="structure view.search_form.render()" />
+<div id="search-form" i18n:domain="pyams_form"
+	 data-ams-widget-sortable="false">
+	${structure:view.search_form.render()}
 	<div class="ams-widget hidden">
 		<header>
 			<span class="widget-icon"><i class="fa fa-flash"></i></span>
 			<h2 i18n:translate="">Search results</h2>
+			<div class="widget-toolbar"
+				 tal:condition="not:getattr(view,'hide_export',False)">
+				<div class="btn-group">
+					<div class="btn btn-xs btn-default"
+						 data-ams-url="MyAMS.container.exportTableToTSV"
+						 data-ams-stop-propagation="true">
+						<i class="fa fa-fw fa-table"></i>&nbsp;
+						<i18n:var translate="">Export to TSV</i18n:var>
+					</div>
+				</div>
+			</div>
 		</header>
 		<div class="widget-body no-padding alerts-container">
 			<div class="widget-body-toolbar"></div>