Show last authors
1 {{velocity}}
2 = $msg.get('newsletter.model.add') =
3 ## Print potential error from before
4 #if("$request.error" == 'alreadyexists')
5 {{warning}}$msg.get("lettreinformationmodeles.add.error.alreadyexists"){{/warning}}
6 #elseif("$request.error" == 'norights')
7 {{warning}}$msg.get("lettreinformationmodeles.add.error.norights"){{/warning}}
8 #end
9
10 {{html clean=false}}
11 <form action="$xwiki.getURL('Code.AddElement', 'get')" method="post">
12 <input class="withTip" type="text" name="modelName" value="$escapetool.xml($msg.get('newsletter.modelName'))"/>
13 <input type="hidden" name="xpage" value="plain"/>
14 <input type="hidden" name="outputSyntax" value="plain"/>
15 <input type="hidden" name="create" value="1"/>
16 <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" />
17 <span class="buttonwrapper"><input class="button" type="submit" name="addModel" value="$msg.get('newsletter.create')"/></span>
18 </form>
19 {{/html}}
20
21 ## and the list of existing template
22 == $msg.get('newsletter.template.list') ==
23 #set($columns = ['doc.title', '_isUsed', "_actions"])
24 #set($columnsProperties = {
25 "doc.title" : {"type" : "text", "link" : "view"},
26 "_isUsed" : {"type" : "text", "link" : "none", "sortable" : false, "filterable" : true},
27 "_actions" : {"actions": ["edit", "delete"]}
28 })
29 #set($options = {
30 "resultPage" : "Code.NewsletterLiveTableResults",
31 "selectedColumn" : "doc.title",
32 "defaultOrder" : "desc",
33 "translationPrefix" : "newsletter.template.livetable.",
34 "extraParams" : "&space=${escapetool.url('LettreInformationModeles')}&className=Code.NewsletterInstanceClass"
35 })
36 #livetable("elements" $columns $columnsProperties $options)
37 {{/velocity}}

Get Connected