Wiki source code of Snippets

Last modified by Simon Urli on 2023/10/09 16:05

Hide last authors
Vincent Massol 1.1 1 {{include reference="ExtensionCode.RepositoryCode"/}}
2
3 {{include reference="ExtensionCode.CreateExtension"/}}
4
Vincent Massol 3.4 5 {{info}}
Simon Urli 10.1 6 Snippets are reusable portions of [[scripts>>xwiki:Documentation.DevGuide.Scripting]] that you can copy paste in wiki pages.
Vincent Massol 3.4 7 {{/info}}
8
Simon Urli 10.1 9 (% class="extension-link search-extension box" %)
Vincent Massol 1.1 10 (((
Simon Urli 10.1 11 (((
Vincent Massol 1.1 12 {{velocity}}
Vincent Massol 3.1 13 === #if($services.icon)$services.icon.render('find')#end Search Snippet... ===
Vincent Massol 1.1 14 {{html}}
15 <form action="$xwiki.getURL("ExtensionCode.ExtensionSearch")">
Thomas Mortagne 8.1 16 <input type="hidden" name="f_space_facet" value="0/Extension." />
Vincent Massol 2.1 17 <input type="text" name="text" value="snippet name..." size="25" class="withTip" id="searchTextInput" />
Vincent Massol 1.1 18 <span class="buttonwrapper">
Vincent Massol 3.1 19 <input class="btn btn-primary" type="submit" value="Search" id="searchSubmit"/>
Vincent Massol 1.1 20 </span>
21 </form>
22 {{/html}}
23
24 {{/velocity}}
25 )))
26 )))
27
Simon Urli 10.1 28 (% class="extension-link add-extension box" %)
Vincent Massol 1.1 29 (((
Simon Urli 10.1 30 (((
Vincent Massol 1.1 31 {{velocity}}
Vincent Massol 3.1 32 === #if($services.icon)$services.icon.render('add')#end Contribute Snippet... ===
Vincent Massol 1.1 33 {{html}}
34 #if ($isGuest)
35 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>.
36 #else
37 <form action="$doc.getURL()" id="createextension">
38 <input type="hidden" name="parent" value="Extension.WebHome" />
39 <input type="hidden" name="template" value="ExtensionCode.ExtensionTemplate" />
40 <input type="hidden" name="createExtension" value="true" />
Vincent Massol 2.1 41 <input class="withTip" type="text" name="name" value="snippet name..." size="25" id="contributeNameInput"/>
Vincent Massol 1.1 42 <span class="buttonwrapper">
Vincent Massol 3.1 43 <input class="btn btn-success" type="submit" value="Add" id="contributeSubmit"/>
Vincent Massol 1.1 44 </span>
45 </form>
46 {{/html}}
47
48 #end
49 {{/velocity}}
50 )))
51 )))
52
Simon Urli 10.1 53 (% class="clearfloats" %)
54 (((
55
56 )))
Vincent Massol 1.1 57
Simon Urli 10.1 58
Vincent Massol 1.1 59 {{velocity}}
Vincent Massol 3.1 60 #set($columns = ["name", "summary", "authors", "doc.creationDate", "doc.date", "rating"])
Vincent Massol 1.1 61 #set($columnsProperties = {
62 "name" : { "type" : "text", "link" : "view" },
63 "summary" : { "type" : "text" },
Vincent Massol 4.1 64 "authors" : {"type" : "text", 'html': true},
Vincent Massol 1.1 65 "doc.creationDate" : { "type" : "date" },
Vincent Massol 3.1 66 "doc.date" : { "type" : "date" },
67 "rating" : { 'html' : true, 'filterable' : false, 'sortable' : false}
Vincent Massol 1.1 68 })
69 #set($options = {
70 "tagCloud":true,
71 "className":"ExtensionCode.ExtensionClass",
72 "selectedColumn":"doc.creationDate",
73 "defaultOrder":"desc",
74 "translationPrefix" : "extension.repository.",
75 "rowCount": 30
76 })
Vincent Massol 3.1 77 #livetable("extensions" $columns $columnsProperties $options)
Vincent Massol 1.1 78
79 (% class="hidden" %) (((
Vincent Massol 3.1 80 Temporary provide a link for robots to index all extension.
Vincent Massol 1.1 81 In the future, this link will be provided via a sitemap.
82 [[ExtensionCode.AllExtensionsList]]
83 )))
84 {{/velocity}}

Get Connected