Version 4.20 by Eduard Moraru on 2017/06/21

Hide last authors
Eduard Moraru 4.16 1 {{velocity}}
Eduard Moraru 4.14 2 ##
3 ## Determine the data page to include.
4 ## Note: Using a separate velocity block and at the top so that we may use the include wiki macro.
5 ##
Eduard Moraru 4.8 6 #set ($projectVersion = $request.get('projectVersion'))
7 #if ("$!projectVersion" != '')
8 #set ($versionDataPage = '.Latest.WebHome')
9 #set ($version = $stringtool.split($projectVersion, '.'))
10 #set ($majorVersion = $numbertool.toNumber($version[0]))
11 #set ($minorVersion = $numbertool.toNumber($version[1].charAt(0)))
12 #if ($majorVersion <= 9 && $minorVersion < 5)
13 #set ($versionDataPage = '.Before9\.5.WebHome')
14 #end
15 {{include reference="$versionDataPage" /}}
16 #end
Eduard Moraru 4.18 17 {{/velocity}}{{velocity}}
Ecaterina Moraru (Valica) 1.1 18 ## ################################################################
Ecaterina Moraru (Valica) 3.1 19 ## Generate URL to OW2 XWiki files that will be used by Main.Download.DownloadForm page
Ecaterina Moraru (Valica) 1.1 20 ## ################################################################
21 #macro(downloadurl $link $version)
22 #set ($downloadLinkData = $downloadLinks.get($link))
23 #if ($downloadLinkData)
24 #if ($downloadLinkData.containsKey($version))
25 ## The artifact to be downloaded depends on the version.
26 ## This happens for instance when we rename an artifact.
27 #set ($downloadLinkData = $downloadLinkData.get($version))
28 #end
29 #set ($version = $escapetool.xml($version))
30 #set ($downloadLink = "${downloadLinkData.get(0)}${version}${downloadLinkData.get(1)}")
Ecaterina Moraru (Valica) 3.1 31 [[Download>>Download.DownloadForm||queryString="downloadURL=http://download.forge.ow2.org/xwiki/${downloadLink}&projectVersion=${version}" class="btn btn-xs btn-${downloadLinkData.get(2)}"]]
Ecaterina Moraru (Valica) 1.1 32 #end
33 #end
34 ## ################################################################
35 ## $categories = Name (0) - Distributions (1) - Color (2) - Description (3)
36 ## ################################################################
Eduard Moraru 4.8 37 #set ($categories = [
Eduard Moraru 4.4 38 ['Demo Installation', $demoDistibutions, 'green',
39 "These Demo packages are not supposed to be used in production, since the embedded database does not support large wikis efficiently and is not tuned for a production usage."],
40 ['Production Installation', $productionDistibutions, 'blue',
41 "Once you're more familiar with XWiki you might want to set it up on your own database or in your own container, in which case you'll then be able to download the WAR file and set up your instance."]
Eduard Moraru 4.8 42 ])
Eduard Moraru 4.4 43 ## ################################################################
44 ## Request Handler
45 ## ################################################################
Ecaterina Moraru (Valica) 1.1 46 #set ($projectVersion = $request.get('projectVersion'))
47 #if ("$!projectVersion" != '')
Eduard Moraru 4.4 48 $xwiki.ssx.use("Download.WebHome")
Eduard Moraru 4.14 49 {{html wiki='true' clean='false'}}
Ecaterina Moraru (Valica) 1.1 50 <div class='download-options download-installation'>
51 #foreach($category in $categories)
52 <div class='col-xs-12 download-container download-option border-$category.get(2)'>
53 <h3>$category.get(0)</h3>
54 <div class='list-group'>
55 #foreach($distibution in ${category.get(1)})
56 <div class='list-group-item'>
Ecaterina Moraru (Valica) 2.1 57 <span class='badge fill-gray'>$distibution.get(2)</span>
Ecaterina Moraru (Valica) 1.1 58 <h4 class='list-group-item-heading'>$distibution.get(1)</h4>
59 <p class='list-group-item-text noitems'>$distibution.get(3)</p>
60 <div class='buttons'>
61 #downloadurl($distibution.get(0), $projectVersion)
Eduard Moraru 4.20 62 #if ($stringtool.isNotBlank($distibution.get(4)))
Eduard Moraru 4.19 63 (% class='btn btn-xs btn-link' %)[[Installation Notes>>$distibution.get(4)]](%%)
64 #end
Ecaterina Moraru (Valica) 1.1 65 </div>
66 </div>
67 #end
68 </div>
69 <p class='noitems'>$category.get(3)</p>
70 </div>
71 #end
72 </div>
Eduard Moraru 4.14 73 {{/html}}
Ecaterina Moraru (Valica) 1.1 74 #else
75 $response.sendRedirect($xwiki.getURL('Download.WebHome'))
76 #end
77 {{/velocity}}
Eduard Moraru 4.4 78

Get Connected