Toggle navigation
Entrar
Registrar
BNMP2
Índice de Documentos
Diretório de Usuários
Application Index
Global
Diretório de Divisões
You need to login to start the chat system
Collections Home
Código fonte Wiki de
Collections Home
Última modificação por
Administrator
em 25/07/2020, 16:12
Esconder números de linha
1: {{velocity}} 2: #if("$!request.collectionName" != '' && "$!request.templateReference" != '') 3: #set ($collectionReference = $services.model.createDocumentReference($doc.wiki, $doc.space, $request.collectionName)) 4: $response.sendRedirect($xwiki.getURL($collectionReference, 'edit', 5: "parent=$escapetool.url($doc.documentReference)&template=$escapetool.url($request.templateReference)")) 6: #stop 7: #end 8: $services.localization.render('collections.home.create.hint') 9: 10: {{html}} 11: <form action="" class="xform half"> 12: <dl> 13: <dt> 14: <label for="collectionName">$services.localization.render('collections.home.create.name')</label> 15: <span class="xHint">$services.localization.render('collections.home.create.name.hint')</span> 16: </dt> 17: <dd><input type="text" name="collectionName" id="collectionName" /></dd> 18: <dt> 19: <label for="templateReference">$services.localization.render('collections.home.create.type')</label> 20: <span class="xHint">$services.localization.render('collections.home.create.type.hint')</span> 21: </dt> 22: <dd> 23: <select name="templateReference" id="templateReference"> 24: #foreach ($type in $services.collection.types) 25: <option value="$services.collection.get($type).templateReference"> 26: $services.localization.render("collections.home.type.$type") 27: </option> 28: #end 29: </select> 30: </dd> 31: </dl> 32: <p class="buttons"> 33: <span class="buttonwrapper"> 34: <input class="button" type="submit" value="$services.localization.render('collections.home.create')" /> 35: </span> 36: </p> 37: </form> 38: {{/html}} 39: 40: #set ($columnsProperties = { 41: 'doc.name': {'type': 'text', 'link': 'view'}, 42: 'type': {'type': 'text'}, 43: 'doc.author': {'type': 'text', 'link': 'author'}, 44: 'doc.date': {'type': 'text'}, 45: '_actions': {'sortable': false, 'filterable': false, 'html': true, 'actions': ['edit', 'delete']} 46: }) 47: #set ($options = { 48: 'className': 'Collections.CollectionClass', 49: 'resultPage': 'Collections.CollectionResults', 50: 'translationPrefix': 'collections.livetable.', 51: 'rowCount': 15, 52: 'maxPages': 10, 53: 'selectedColumn': 'doc.name', 54: 'defaultOrder': 'asc' 55: }) 56: #set ($columns = ['doc.name', 'type', 'doc.author', 'doc.date', '_actions']) 57: #livetable('collections' $columns $columnsProperties $options) 58: {{/velocity}}