Wiki source code of Snippets

Version 2.1 by Vincent Massol on 2016/07/22 10:48

Show last authors
1 {{include reference="ExtensionCode.RepositoryCode"/}}
2
3 {{include reference="ExtensionCode.CreateExtension"/}}
4
5 (% class="centered" %) (((
6
7 (% class="extension-link search-extension" %)(((
8 Search Snippets...
9 (((
10 {{velocity}}
11 {{html}}
12 <form action="$xwiki.getURL("ExtensionCode.ExtensionSearch")">
13 <input type="hidden" name="space" value="Extension" />
14 <input type="text" name="text" value="snippet name..." size="25" class="withTip" id="searchTextInput" />
15 <span class="buttonwrapper">
16 <input class="button" type="submit" value="Search" id="searchSubmit"/>
17 </span>
18 </form>
19 {{/html}}
20
21 [[Advanced>>ExtensionCode.ExtensionSearch||queryString="space=Extension"]]
22 {{/velocity}}
23 )))
24 )))
25
26 (% class="extension-link add-extension" %)(((
27 Contribute Snippet...
28
29 (((
30 {{velocity}}
31 {{html}}
32 #if ($isGuest)
33 You need first to <a href="${escapetool.xml($xwiki.getURL('Main.WebHome', 'login', "xredirect=$doc.externalURL"))}">log in</a> or <a href="${escapetool.xml($xwiki.getURL($services.model.resolveDocument('', 'default'), "register", "xredirect=$doc.externalURL"))}">register</a>.
34 #else
35 <form action="$doc.getURL()" id="createextension">
36 <input type="hidden" name="parent" value="Extension.WebHome" />
37 <input type="hidden" name="template" value="ExtensionCode.ExtensionTemplate" />
38 <input type="hidden" name="createExtension" value="true" />
39 <input class="withTip" type="text" name="name" value="snippet name..." size="25" id="contributeNameInput"/>
40 <span class="buttonwrapper">
41 <input class="button" type="submit" value="Add" id="contributeSubmit"/>
42 </span>
43 </form>
44 {{/html}}
45
46 #end
47 {{/velocity}}
48 )))
49 )))
50
51 )))
52
53 (% class="clearfloats" %)((()))(%%)
54
55 {{velocity}}
56 #set($columns = ["name", "summary", "type", "category", "authors", "doc.creationDate", "doc.date"])
57 #set($columnsProperties = {
58 "name" : { "type" : "text", "link" : "view" },
59 "summary" : { "type" : "text" },
60 "type" : { "type" : "list" },
61 "category" : { "type" : "list" },
62 "authors" : { "type" : "text", 'html': true},
63 "doc.creationDate" : { "type" : "date" },
64 "doc.date" : { "type" : "date" }
65 })
66 #set($options = {
67 "tagCloud":true,
68 "className":"ExtensionCode.ExtensionClass",
69 "selectedColumn":"doc.creationDate",
70 "defaultOrder":"desc",
71 "translationPrefix" : "extension.repository.",
72 "rowCount": 30
73 })
74 #livetable("snippets" $columns $columnsProperties $options)
75
76 (% class="hidden" %) (((
77 Temporary provide a link for robots to index all snippets.
78 In the future, this link will be provided via a sitemap.
79 [[ExtensionCode.AllExtensionsList]]
80 )))
81 {{/velocity}}

Get Connected