Version 4.20 by Eduard Moraru on 2017/06/21

Show last authors
1 {{velocity}}
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 ##
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
17 {{/velocity}}{{velocity}}
18 ## ################################################################
19 ## Generate URL to OW2 XWiki files that will be used by Main.Download.DownloadForm page
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)}")
31 [[Download>>Download.DownloadForm||queryString="downloadURL=http://download.forge.ow2.org/xwiki/${downloadLink}&projectVersion=${version}" class="btn btn-xs btn-${downloadLinkData.get(2)}"]]
32 #end
33 #end
34 ## ################################################################
35 ## $categories = Name (0) - Distributions (1) - Color (2) - Description (3)
36 ## ################################################################
37 #set ($categories = [
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."]
42 ])
43 ## ################################################################
44 ## Request Handler
45 ## ################################################################
46 #set ($projectVersion = $request.get('projectVersion'))
47 #if ("$!projectVersion" != '')
48 $xwiki.ssx.use("Download.WebHome")
49 {{html wiki='true' clean='false'}}
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'>
57 <span class='badge fill-gray'>$distibution.get(2)</span>
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)
62 #if ($stringtool.isNotBlank($distibution.get(4)))
63 (% class='btn btn-xs btn-link' %)[[Installation Notes>>$distibution.get(4)]](%%)
64 #end
65 </div>
66 </div>
67 #end
68 </div>
69 <p class='noitems'>$category.get(3)</p>
70 </div>
71 #end
72 </div>
73 {{/html}}
74 #else
75 $response.sendRedirect($xwiki.getURL('Download.WebHome'))
76 #end
77 {{/velocity}}

Get Connected