# HG changeset patch # User Thierry Florac # Date 1530543994 -7200 # Node ID c84c4fc33e5b8dc79b2870863951d0ecfed67dce # Parent 6d7a963f5c9866517cdec4a245ba54627fa02ab1 Updated thumbnails view to get correct timestamp for each thumbnail diff -r 6d7a963f5c98 -r c84c4fc33e5b src/pyams_file/zmi/image.py --- a/src/pyams_file/zmi/image.py Thu Jun 28 10:38:47 2018 +0200 +++ b/src/pyams_file/zmi/image.py Mon Jul 02 17:06:34 2018 +0200 @@ -643,9 +643,10 @@ selection = thumbnails.get_selection(name) transaction.commit() thumbnails = IThumbnail(selection) - thumbnails.get_thumbnail('200x128') + thumbnail = thumbnails.get_thumbnail('200x128') thumbnailers.setdefault(translate(adapter.section), []).append({'name': name, - 'label': translate(adapter.label)}) + 'label': translate(adapter.label), + 'thumbnail': thumbnail}) transaction.commit() return thumbnailers diff -r 6d7a963f5c98 -r c84c4fc33e5b src/pyams_file/zmi/templates/image-thumbnails.pt --- a/src/pyams_file/zmi/templates/image-thumbnails.pt Thu Jun 28 10:38:47 2018 +0200 +++ b/src/pyams_file/zmi/templates/image-thumbnails.pt Mon Jul 02 17:06:34 2018 +0200 @@ -1,5 +1,7 @@ - - + +
@@ -10,8 +12,9 @@
+ thname '{0}:'.format(name) if name else ''; + thumbnail adapter['thumbnail'];" + tal:attributes="src string:${base}/++thumb++${thname}200x128.jpeg?_=${extension:timestamp(thumbnail)}" />