Updated template
authorThierry Florac <thierry.florac@onf.fr>
Mon, 02 Jul 2018 17:07:25 +0200
changeset 113 97e1ed0fc7c7
parent 112 c84c4fc33e5b
child 114 06e85cf61575
Updated template
src/pyams_file/widget/templates/media-input.pt
--- a/src/pyams_file/widget/templates/media-input.pt	Mon Jul 02 17:06:34 2018 +0200
+++ b/src/pyams_file/widget/templates/media-input.pt	Mon Jul 02 17:07:25 2018 +0200
@@ -36,8 +36,9 @@
 							  content="structure viewlet/render">
 					</tal:loop>
 					<a class="btn btn-xs btn-primary" target="download_window"
-					   tal:define="href extension:absolute_url(value)"
-					   tal:attributes="href string:${href}?download=1&_=${view/timestamp}"
+					   tal:define="href extension:absolute_url(value);
+								   timestamp extension:timestamp(value);"
+					   tal:attributes="href string:${href}?download=1&_=${timestamp}"
 					   i18n:translate="">
 						Download
 					</a>
@@ -54,10 +55,9 @@
 			   tal:attributes="href extension:absolute_url(target);"
 			   title="Zoom image" i18n:attributes="title">
 				<img class="thumbnail" title="" src="" alt=""
-					 tal:define="url extension:absolute_url(thumbnail);
-								 timestamp extension:timestamp(thumbnail);"
+					 tal:define="url extension:absolute_url(thumbnail);"
 					 tal:attributes="id string:thumbnail_${extension:cache_key(value)};
-									 src string:${url}?_=${timestamp};
+									 src string:${url};
 									 title i18n:value.title;" />
 			</a>
 			<div class="margin-top-5">
@@ -75,8 +75,9 @@
 							  content="structure viewlet/render">
 					</tal:loop>
 					<a class="btn btn-xs btn-primary" target="download_window"
-					   tal:define="href extension:absolute_url(value)"
-					   tal:attributes="href string:${href}?download=1&_=${view/timestamp}"
+					   tal:define="href extension:absolute_url(value);
+								   timestamp extension:timestamp(value)"
+					   tal:attributes="href string:${href}?download=1&_=${timestamp}"
 					   i18n:translate="">
 						Download
 					</a>