Show last authors
1 {{velocity}}
2 #set($user = $xwiki.getUser($context.user))
3 #if($hasAdmin || $user.isUserInGroup('XWiki.LettreInfoGroup'))
4 $!xwiki.jsx.use('LettreInformationElements.WebHome')##
5 = $msg.get('newsletter.elements.add') =
6 ## Print potential error from before
7 #if("$request.error" == 'alreadyexists')
8 {{warning}}$msg.get("lettreinformationelements.add.error.alreadyexists"){{/warning}}
9 #elseif("$request.error" == 'norights')
10 {{warning}}$msg.get("lettreinformationelements.add.error.norights"){{/warning}}
11 #end
12
13 {{html clean=false}}
14 <form action="$xwiki.getURL('Code.AddElement', 'get')" method="get">
15 <input type="hidden" name="xpage" value="plain"/>
16 <input type="hidden" name="create" value="1"/>
17 <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" />
18 <input id="elementName" class="withTip" type="text" name="elementName" value="$escapetool.xml($msg.get('elements.elementName'))"/>
19 <span class="buttonwrapper"><input id="addElement" class="button" type="submit" name="addElement" value="$msg.get('newsletter.create')"/></span>
20 </form>
21 {{/html}}
22 #end
23
24 ## and the list of existing elements
25 == $msg.get('newsletter.elements.list') ==
26 #set($columns = ["sectionName", "_actions"])
27 #set($columnsProperties = {
28 "sectionName" : {"type" : "text", "link" : "view"},
29 "_actions" : {"actions": ["edit", "delete"]}
30 })
31 #set($options = {
32 "className" : "Code.ElementsClass",
33 "selectedColumn" : "doc.date",
34 "defaultOrder" : "desc",
35 "translationPrefix" : "newsletter.elements.livetable.",
36 "extraParams" : "&space=${escapetool.url('LettreInformationElements')}"
37 })
38 #livetable("elements" $columns $columnsProperties $options)
39 {{/velocity}}

Get Connected