Changes for page Attachments
Last modified by Leonardo Fonseca on 09/07/2025
From version 2.1
edited by Leonardo Fonseca
on 30/01/2020
on 30/01/2020
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-attachment-ui/12.0]
To version 4.1
edited by Leonardo Fonseca
on 13/04/2021
on 13/04/2021
Change comment:
Migrated property [priority] from class [XWiki.WikiMacroClass]
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -10,7 +10,7 @@ 10 10 #set ($docAction = $request.get('docAction')) 11 11 #set ($attachmentList = $targetAttachDocument.getAttachmentList()) 12 12 #if ($attachmentList && $attachmentList.size() > 0) 13 - #set ($sortedAttachments = $collection stool.sort($attachmentList, 'date:desc'))13 + #set ($sortedAttachments = $collectiontool.sort($attachmentList, 'date:desc')) 14 14 #set ($lastAttachment = $sortedAttachments.get(0)) 15 15 #end 16 16 $response.sendRedirect($targetDocument.getURL($docAction, $escapetool.url({ ... ... @@ -49,7 +49,7 @@ 49 49 #attachmentPicker_displayUploadForm($targetDocument, $targetAttachDocument, $options) 50 50 #end 51 51 #attachmentPicker_displayAttachmentGalleryEmptyValue($targetDocument, $targetAttachDocument, $options, $currentValue) 52 - #set ($sortedAttachments = $collection stool.sort($targetAttachDocument.getAttachmentList(), "${options.sortAttachmentsBy}") )52 + #set ($sortedAttachments = $collectiontool.sort($targetAttachDocument.getAttachmentList(), "${options.sortAttachmentsBy}") ) 53 53 #foreach ($attachment in $sortedAttachments) 54 54 #set ($extension = $attachment.getFilename()) 55 55 #set ($extension = $extension.substring($mathtool.add($extension.lastIndexOf('.'), 1)).toLowerCase())
- XWiki.WikiMacroClass[0]
-
- Macro code
-
... ... @@ -3,7 +3,6 @@ 3 3 $xwiki.ssfx.use('js/xwiki/widgets/modalPopup.css', true)## 4 4 $xwiki.jsx.use($xcontext.macro.doc.fullName)## 5 5 $xwiki.ssx.use($xcontext.macro.doc.fullName)## 6 -$xwiki.jsfx.use('js/scriptaculous/builder.js')## 7 7 ## Integrates the optional Lightbox widget (from http://extensions.xwiki.org/xwiki/bin/view/Extension/Lightbox+Application ) 8 8 #if ($xwiki.exists('XWiki.Lightbox')) 9 9 $xwiki.jsx.use('XWiki.Lightbox')