Wiki source code of RDF-Datatypes
Version 6.1 by Ophion Admin on 2026/10/07 17:16
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{velocity}} | ||
| 2 | ## --- Configuration: adapt to your installation --- | ||
| 3 | #set ($nsClass = 'RDF-Namespaces.Code.RDF-NamespacesClass') | ||
| 4 | #set ($template = 'RDF-Datatypes.Code.RDF-DatatypesTemplate') | ||
| 5 | |||
| 6 | ## All namespace entries, excluding the template in the Code space | ||
| 7 | #set ($namespaces = $services.query.hql(", BaseObject as obj where doc.fullName = obj.name and obj.className = :cls and doc.space not like '%.Code' order by doc.fullName").bindValue('cls', $nsClass).execute()) | ||
| 8 | |||
| 9 | {{html clean="false"}} | ||
| 10 | <form action="$doc.getURL('create')" method="post" class="xform"> | ||
| 11 | <input type="hidden" name="form_token" value="$services.csrf.token" /> | ||
| 12 | <input type="hidden" name="template" value="$template" /> | ||
| 13 | <input type="hidden" name="tocreate" value="terminal" /> | ||
| 14 | <dl> | ||
| 15 | <dt><label for="spaceReference">Namespace</label></dt> | ||
| 16 | <dd> | ||
| 17 | <select id="spaceReference" name="spaceReference"> | ||
| 18 | #foreach ($n in $namespaces) | ||
| 19 | ## The namespace page is <prefix>.WebHome, so its space is the storage location | ||
| 20 | #set ($space = $services.model.resolveDocument($n).lastSpaceReference) | ||
| 21 | <option value="$escapetool.xml($services.model.serialize($space, 'local'))">$escapetool.xml($space.name)</option> | ||
| 22 | #end | ||
| 23 | </select> | ||
| 24 | </dd> | ||
| 25 | <dt><label for="name">Datatype name</label></dt> | ||
| 26 | <dd><input type="text" id="name" name="name" placeholder="date" /></dd> | ||
| 27 | </dl> | ||
| 28 | <p><input type="submit" class="button" value="Create datatype" /></p> | ||
| 29 | </form> | ||
| 30 | {{/html}} | ||
| 31 | {{/velocity}} | ||
| 32 | |||
| 33 | {{velocity}} | ||
| 34 | #set ($columnsProperties = { | ||
| 35 | 'doc.title': {"link":"view"}, | ||
| 36 | 'doc.location': {"html":true}, | ||
| 37 | 'shortText1': {"html":true}, | ||
| 38 | 'doc.date': {}, | ||
| 39 | 'doc.author': {"link":"author"}, | ||
| 40 | '_actions': {"sortable":false,"filterable":false,"html":true,"actions":["edit","delete"]} | ||
| 41 | }) | ||
| 42 | #set ($options = { | ||
| 43 | 'className': 'RDF-Datatypes.Code.RDF-DatatypesClass', | ||
| 44 | 'translationPrefix': 'rdf-datatypes.livetable.', | ||
| 45 | 'tagCloud': true, | ||
| 46 | 'rowCount': 15, | ||
| 47 | 'maxPages': 10, | ||
| 48 | 'selectedColumn': 'doc.title', | ||
| 49 | 'defaultOrder': 'asc' | ||
| 50 | }) | ||
| 51 | #set ($columns = ['doc.title', 'doc.location', 'shortText1', 'doc.date', 'doc.author', '_actions']) | ||
| 52 | #livetable('rdf-datatypes' $columns $columnsProperties $options) | ||
| 53 | {{/velocity}} |