#macro (sortHover $sortByLink) #if (!($sortBy == $sortByLink))sortHover#end #end #applyDecorator("root") #decoratorParam("helper" $action.helper) #decoratorParam("context" "space-operations") #decoratorParam("mode" "view-space-operations") #applyDecorator ("root") #decoratorParam ("context" "spacecontentpanel") #decoratorParam("helper" $action.helper) #decoratorParam("selection" "space-attachments") #decoratorParam("selectedSpaceToolsWebItem" "space-attachments") #requireResource("confluence.web.resources:attachments")
#set ($results = $action.paginationSupport.page) #if (!$results.empty || $textUtil.stringSet($fileExtension) || $labelsCount > 0)
#end #if (!$results.empty) #foreach ($attachment in $results) #set ($labels = $attachment.labels) #set ($labelable = $attachment) #end
#sortLink("" "$req.contextPath/spaces/listattachmentsforspace.action?key=$!htmlUtil.urlEncode($space.key)&fileExtension=$!htmlUtil.urlEncode($!fileExtension)&sortBy=" $action.getText('columnheading.name')) #sortLink("size" "$req.contextPath/spaces/listattachmentsforspace.action?key=$!htmlUtil.urlEncode($space.key)&fileExtension=$!htmlUtil.urlEncode($!fileExtension)&sortBy=size" $action.getText('columnheading.size')) $action.getText('creator.name') #sortLink("createddate" "$req.contextPath/spaces/listattachmentsforspace.action?key=$!htmlUtil.urlEncode($space.key)&fileExtension=$!htmlUtil.urlEncode($!fileExtension)&sortBy=createddate" $action.getText('columnheading.creation.date')) #sortLink("date" "$req.contextPath/spaces/listattachmentsforspace.action?key=$!htmlUtil.urlEncode($space.key)&fileExtension=$!htmlUtil.urlEncode($!fileExtension)&sortBy=date" $action.getText('space-last-mod-date')) $action.getText('labels.name') $action.getText('attached.to')
#parse ("/pages/includes/attachment_icon.vm") $generalUtil.shortenString($attachment.fileName, 50) $!attachment.niceFileSize #userLink($!attachment.creator) $dateFormatter.formatDateTime($!attachment.creationDate) $dateFormatter.formatDateTime($!attachment.lastModificationDate) #parse("/com/atlassian/confluence/plugins/labels/components/labels-content.vm") #contentLink2 ($!attachment.getContainer() true false)
#pagination($action.paginationSupport "listattachmentsforspace.action?key=$!htmlUtil.urlEncode($key)&startsWith=$!htmlUtil.urlEncode($!action.startsWith)&sortBy=$!htmlUtil.urlEncode($!sortBy)&fileExtension=$!htmlUtil.urlEncode($!fileExtension)&labels=$!htmlUtil.htmlEncode($!labels)&") #else #if ($textUtil.stringSet($fileExtension)) $action.getText('currently.no.attachments.in.space.ending.with.ext', ["$htmlUtil.htmlEncode($fileExtension)"]) #if($labelsCount > 1) $action.getText('currently.no.attachments.also.with.labels', ["$htmlUtil.htmlEncode($labels)"]) #elseif($labelsCount == 1) $action.getText('currently.no.attachments.also.with.label', ["$htmlUtil.htmlEncode($labels)"]) #end #elseif($labelsCount > 1) $action.getText('currently.no.attachments.in.space.with.labels', ["$htmlUtil.htmlEncode($labels)"]) #elseif($labelsCount == 1) $action.getText('currently.no.attachments.in.space.with.label', ["$htmlUtil.htmlEncode($labels)"]) #else $action.getText('currently.no.attachments.in.space') #end #end
#end #end