Updated widgets templates
authorThierry Florac <tflorac@ulthar.net>
Fri, 21 Dec 2018 16:44:55 +0100
changeset 164 69b4c4fb6cac
parent 163 bac63d15b259
child 165 005ff4a2d39a
Updated widgets templates
src/pyams_file/widget/templates/file-display.pt
src/pyams_file/widget/templates/file-input.pt
src/pyams_file/widget/templates/media-display.pt
--- a/src/pyams_file/widget/templates/file-display.pt	Thu Dec 20 18:46:31 2018 +0100
+++ b/src/pyams_file/widget/templates/file-display.pt	Fri Dec 21 16:44:55 2018 +0100
@@ -16,8 +16,9 @@
 			&nbsp;&ndash;&nbsp;
 			<span tal:content="python:view.get_human_size(value.get_size())"></span>
 			<a class="btn btn-xs btn-primary" target="download_window"
-			   tal:define="href tales:absolute_url(value)"
-			   tal:attributes="href string:${href}?download=1&_=${view/timestamp}"
+			   tal:define="href tales:absolute_url(value);
+						   timestamp tales:timestamp(value)"
+			   tal:attributes="href string:${href}?download=1&_=${timestamp}"
 			   i18n:translate="">Download</a>
 		</div>
 	</div>
--- a/src/pyams_file/widget/templates/file-input.pt	Thu Dec 20 18:46:31 2018 +0100
+++ b/src/pyams_file/widget/templates/file-input.pt	Fri Dec 21 16:44:55 2018 +0100
@@ -40,8 +40,9 @@
 						  content="structure viewlet/render">
 				</tal:loop>
 				<a class="btn btn-xs btn-primary" target="download_window"
-				   tal:define="href tales:absolute_url(value)"
-				   tal:attributes="href string:${href}?download=1&_=${view/timestamp}"
+				   tal:define="href tales:absolute_url(value);
+							   timestamp tales:timestamp(value)"
+				   tal:attributes="href string:${href}?download=1&_=${timestamp}"
 				   i18n:translate="">
 					Download
 				</a>
--- a/src/pyams_file/widget/templates/media-display.pt	Thu Dec 20 18:46:31 2018 +0100
+++ b/src/pyams_file/widget/templates/media-display.pt	Fri Dec 21 16:44:55 2018 +0100
@@ -64,7 +64,7 @@
 				&nbsp;&ndash;&nbsp;
 				<span tal:content="python:view.get_human_size(value.get_size())"></span>
 				<a class="btn btn-xs btn-primary" target="download_window"
-				   tal:define="href tales:absolute_url(value)
+				   tal:define="href tales:absolute_url(value);
 							   timestamp tales:timestamp(value)"
 				   tal:attributes="href string:${href}?download=1&_=${timestamp}"
 				   i18n:translate="">Download</a>