<
From version < 4.20 >
edited by Eduard Moraru
on 2017/06/21
To version < 5.2 >
edited by Eduard Moraru
on 2018/06/21
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -5,18 +5,23 @@
5 5  ##
6 6  #set ($projectVersion = $request.get('projectVersion'))
7 7  #if ("$!projectVersion" != '')
8 - #set ($versionDataPage = '.Latest.WebHome')
9 - #set ($version = $stringtool.split($projectVersion, '.'))
8 + #set ($versionPart = $stringtool.substringBefore($projectVersion, '-'))
9 + #set ($version = $stringtool.split($versionPart, '.'))
10 10   #set ($majorVersion = $numbertool.toNumber($version[0]))
11 - #set ($minorVersion = $numbertool.toNumber($version[1].charAt(0)))
11 + #set ($minorVersion = $numbertool.toNumber($version[1]))
12 + ## Read the version's artefacts and file names from the dedicated page.
13 + #set ($versionDataPage = '.Latest.WebHome')
14 + ## Dedicated pages exist for older versions with different contents and file names.
12 12   #if ($majorVersion <= 9 && $minorVersion < 5)
13 13   #set ($versionDataPage = '.Before9\.5.WebHome')
17 + #elseif ($majorVersion <= 10 && $minorVersion < 5)
18 + #set ($versionDataPage = '.Before10\.5.WebHome')
14 14   #end
15 15   {{include reference="$versionDataPage" /}}
16 16  #end
17 17  {{/velocity}}{{velocity}}
18 18  ## ################################################################
19 -## Generate URL to OW2 XWiki files that will be used by Main.Download.DownloadForm page
24 +## Generate the URL to XWiki files that will be used by the Download.DownloadForm page
20 20  ## ################################################################
21 21  #macro(downloadurl $link $version)
22 22   #set ($downloadLinkData = $downloadLinks.get($link))
... ... @@ -26,9 +26,11 @@
26 26   ## This happens for instance when we rename an artifact.
27 27   #set ($downloadLinkData = $downloadLinkData.get($version))
28 28   #end
34 + #set ($downloadLinkPath = "#getDownloadLinkPath($downloadLinkData, $version)")
29 29   #set ($version = $escapetool.xml($version))
30 - #set ($downloadLink = "${downloadLinkData.get(0)}${version}${downloadLinkData.get(1)}")
31 - [[Download>>Download.DownloadForm||queryString="downloadURL=http://download.forge.ow2.org/xwiki/${downloadLink}&projectVersion=${version}" class="btn btn-xs btn-${downloadLinkData.get(2)}"]]
36 + ## Last $downloadLinkData element always contains the link button class.
37 + #set ($linkBtnClass = "${downloadLinkData.get($mathtool.sub($downloadLinkData.size(), 1))}")
38 + [[Download>>Download.DownloadForm||queryString="downloadURL=${downloadLinkBase}${downloadLinkPath}&projectVersion=${version}" class="btn btn-xs btn-$linkBtnClass"]]
32 32   #end
33 33  #end
34 34  ## ################################################################

Get Connected