}
infos.append(d)
-return {'infos':infos, 'batch':batch, 'features':features}
+return {'infos':infos,
+ 'batch':batch,
+ 'features':features,
+ 'sorting' : {'sort_on' : sort_on,
+ 'sort_order' : sort_order}
+ }
else :
return '<deleted>%s</deleted>' % msg
if fg('set_sorting') :
- context.setDefaultSorting(fg('sorting'), False)
+ context.setDefaultSorting(fg('sort_on'), False)
if not fg('ajax') :
return context.setRedirect(context, 'object/view')
else :
tal:condition="python:mtool.checkPermission(ModifyPortalContent, here)">
<span>
<span i18n:translate="" tal:omit-tag="">sorting:</span>
- <select name="sorting">
- <option value="position" i18n:translate="">manual</option>
- <option value="DateTimeOriginal" i18n:translate="">shooting</option>
- <option value="modified" i18n:translate="">modification</option>
+ <select tal:define="sort_on batchInfos/sorting/sort_on"
+ name="sort_on">
+ <option tal:attributes="selected python:sort_on=='position'"
+ value="position" i18n:translate="">manual</option>
+ <option tal:attributes="selected python:sort_on=='DateTimeOriginal'"
+ value="DateTimeOriginal" i18n:translate="">shooting</option>
+ <option tal:attributes="selected python:sort_on=='modified'"
+ value="modified" i18n:translate="">modification</option>
</select>
<noscript>
<input type="submit" name="set_sorting" value="ok"/>