xwiki/xwiki-platform — pull request #53 by jamiemaher (2012-06-14 21:05:27+00:00)
Title: Add support for sorting a page's attachments via request parameter

I modified attachmentsinline.vm to accept the request parameter "sortAttachBy", and it defaults to sorting by the filename. If the sortAttachBy is set to "date" then it will sort the attachments by descending, otherwise it sorts it ascending.

I also modified the docextra.vm to pass through the sortAttachBy request parameter to the attachmentsinline.vm ajax call if that parameter is set.

A dropdown

input could be implemented easily on top of this request parameter support, that allows the user to choose how they want to sort the page's attachments.