Changes for page Extensions Wiki

Last modified by Vincent Massol on 2017/03/01 17:23

From version 47.1
edited by Thomas Mortagne
on 2011/06/26 11:05
Change comment: There is no comment for this version
To version 50.1
edited by Vincent Massol
on 2011/11/18 11:47
Change comment: There is no comment for this version

Summary

Details

Page properties
Parent
... ... @@ -1,0 +1,1 @@
1 +Main.WebHome
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.ThomasMortagne
1 +xwiki:XWiki.VincentMassol
Content
... ... @@ -1,86 +1,21 @@
1 1  {{velocity}}
2 -## If this page is called with createExtension=true then create a new page using the ExtensionTemplate template
3 -#if ($request.createExtension == "true")
4 - $response.sendRedirect($xwiki.getURL("Extension.${request.name}", "inline", "$!{request.queryString}&title=${request.name}"))
5 -#end
6 -{{/velocity}}
7 -
8 -{{box cssClass="extensionsAbout"}}
9 -Extensions are ways to extend XWiki Enterprise. Select the Extension you wish to install from the list below and then follow the instructions on the extension page to install it in your wiki.
10 -{{/box}}
11 -
12 -(% class="centered" %) (((
13 -
14 -(% class="extension-link search-extension" %)(((
15 -Search Extension...
16 -(((
17 -{{velocity}}
18 -{{html}}
19 -<form action="$xwiki.getURL("ExtensionCode.ExtensionSearch")">
20 - <input type="hidden" name="space" value="Extension" />
21 - <input type="text" name="text" value="extension name..." size="25" class="withTip" />
22 - <span class="buttonwrapper">
23 - <input class="button" type="submit" value="Search" />
24 - </span>
25 -</form>
26 -{{/html}}
27 -{{/velocity}}
28 -)))
29 -)))
30 -
31 -(% class="extension-link add-extension" %)(((
32 -Contribute Extension...
33 -
34 -(((
35 -{{velocity}}
36 -#if ($isGuest)
37 - You need first to [[log in>>path:$xwiki.getURL("Main.WebHome", "login", "xredirect=$doc.externalURL")]] or [[register>>path:$xwiki.getURL("xwiki:Main.WebHome", "register", "xredirect=$doc.externalURL")]].
2 +## This pages serves 2 purposes:
3 +## - Used by the Extension Manager UI to display the documentation link for an extension based on the Maven <url> element which are set to http://xwiki.org/documentation?id=${groupId}:${artifactId}&path=...
4 +## See http://markmail.org/thread/s5lszhwxa5e7yl5u for details
5 +## - It's displays the list of extensions (when there's no "id" request parameter)
6 +##
7 +#if ("$!request.id" != "")
8 + ## Locate the extension by its id
9 + #set ($xwql = "where doc.object(ExtensionCode.ExtensionClass).id = '$request.id'")
10 + #set ($result = $services.query.xwql($xwql).execute())
11 + #if ($result.size() > 0)
12 + $response.sendRedirect($xwiki.getURL($result.get(0)))
13 + #else
14 + ## Unknown ID, list all extensions
15 + {{include document="Extension.WebHome"/}}
16 + #end
38 38  #else
39 -{{html}}
40 -<form action="" id="newextension">
41 - <input type="hidden" name="parent" value="Main.WebHome" />
42 - <input type="hidden" name="template" value="ExtensionCode.ExtensionTemplate" />
43 - <input type="hidden" name="createExtension" value="true" />
44 - <input class="withTip" type="text" name="name" value="extension name..." size="25"/>
45 - <span class="buttonwrapper">
46 - <input class="button" type="submit" value="Add" />
47 - </span>
48 -</form>
49 -{{/html}}
18 + {{include document="Extension.WebHome"/}}
50 50  #end
51 51  {{/velocity}}
52 -)))
53 -)))
54 54  
55 -)))
56 -
57 -(% class="clearfloats" %)((()))(%%)
58 -
59 -{{velocity}}
60 -#set($columns = ["doc.name", "summary", "type", "contributors", "doc.creationDate", "doc.date"])
61 -#set($columnsProperties = {
62 - "doc.name" : { "type" : "text", "link" : "view" },
63 - "summary" : { "type" : "text" },
64 - "type" : { "type" : "list" },
65 - "contributors" : { "type" : "text"},
66 - "doc.creationDate" : { "type" : "date" },
67 - "doc.date" : { "type" : "date" }
68 -})
69 -#set($options = {
70 - "tagCloud":true,
71 - "resultPage":"ExtensionCode.ExtensionJSON",
72 - "className":"ExtensionCode.ExtensionClass",
73 - "selectedColumn":"doc.creationDate",
74 - "defaultOrder":"desc",
75 - "translationPrefix" : "xwikiorg.extensions.",
76 - "rowCount": 30,
77 - "extraParams" : 'space=Extension'
78 -})
79 -#livetable("extensions" $columns $columnsProperties $options)
80 -
81 -(% class="hidden" %) (((
82 -Temporary provide a link for robots to index all extension.
83 -In the future, this link will be provided via a sitemap.
84 -[[ExtensionCode.AllExtensionsList]]
85 -)))
86 -{{/velocity}}

Get Connected