Code source wiki de Create Task Template
Modifié par Admin le 11/12/2025 - 15:45
Masquer les derniers auteurs
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 1 | {{velocity}} |
| 2 | #set ($discard = $xwiki.jsx.use('TaskManager.TaskTemplateList')) | ||
| 3 | {{html}} | ||
| 4 | <form class='xform'> | ||
| 5 | <input name='outputSyntax' type='hidden' value='plain'> | ||
| 6 | <dl> | ||
| 7 | <dt> | ||
| 8 | <label for='templateName'>$escapetool.xml($services.localization.render('taskmanager.templateList.label'))</label> | ||
| 9 | <span class='xHint'>$escapetool.xml($services.localization.render('taskmanager.templateList.hint'))</span> | ||
| 10 | </dt> | ||
| 11 | <dd><input name='templateName' type='text' required></input></dd> | ||
| 12 | </dl> | ||
| 13 | <button id='button-submit-template' class='btn btn-primary'>$escapetool.xml($services.localization.render('taskmanager.templateList.button'))</button> | ||
| 14 | </form> | ||
| 15 | {{/html}} | ||
| 16 | |||
| 17 | #set ($options = { | ||
| 18 | 'tagCloud': true, | ||
| 19 | 'className': 'XWiki.TemplateProviderClass', | ||
| 20 | 'translationPrefix': 'taskmanager.livetable.', | ||
| 21 | 'resultPage': 'TaskManager.TaskTemplateListLivetableResults', | ||
| 22 | 'queryFilters': 'currentlanguage,unique' | ||
| 23 | }) | ||
| 24 | #set ($liveDataConfig = {'meta': {'propertyDescriptors': [ | ||
| 25 | {'id': 'name', 'name' : "$services.localization.render('taskmanager.templateList.livetable.providerName')", | ||
| 26 | 'displayer': {'id': 'link', 'propertyHref': 'doc.url' }}, | ||
| 27 | {'id': 'template', 'name': "$services.localization.render('taskmanager.templateList.livetable.taskName')" }, | ||
| 28 | { 'id': '_actions', 'displayer': { 'id': 'actions', 'actions': ['delete'] }} | ||
| 29 | ]}}) | ||
| 30 | |||
| 31 | {{liveData | ||
| 32 | id="taskManagerTemplates" | ||
| 33 | properties="name,description,template,doc.date,doc.author,_actions" | ||
| 34 | source="liveTable" | ||
| 35 | sourceParameters="$services.rendering.escape($escapetool.url($options), 'xwiki/2.1')" | ||
| 36 | }} | ||
| 37 | $jsontool.serialize($liveDataConfig) | ||
| 38 | {{/liveData}} | ||
| 39 | {{/velocity}} |