General Actions:
Log-in
Register
Home
▼
:
Wiki Index
»
Space:
XWiki
»
Page:
SearchSuggestSourceSheet
default
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Welcome to bytebang
»
SearchCode
»
Search Suggest Configuration
»
SearchSuggestSourceClass
»
SearchSuggestSourceSheet
Wiki source code of
SearchSuggestSourceSheet
Last modified by
Administrator
on 2014/06/29 19:29
Attachments
(0)
·
Information
Hide line numbers
1: {{velocity}} 2: #set ($className = 'XWiki.SearchSuggestSourceClass') 3: #set ($class = $xwiki.getDocument($className).xWikiClass) 4: #if (!$object && "$!request.xobjectNumber" != '') 5: #set ($object = $doc.getObject($className, $mathtool.toInteger($request.xobjectNumber))) 6: #end 7: #if (!$object) 8: #set ($object = $doc.getObject($className, true)) 9: #end 10: #set ($discard = $doc.use($object)) 11: #set ($prefix = "${className}_${object.number}_") 12: ## We include the 'get' action because we use it when adding a new search suggest source through AJAX. 13: #set ($editing = $xcontext.action == 'admin' || $xcontext.action == 'edit' || $xcontext.action == 'inline' || $xcontext.action == 'get') 14: (% class="xform" %)((( 15: #foreach ($property in $class.properties) 16: #set ($displayFormType = $property.getProperty('displayFormType')) 17: #set ($isCheckbox = $editing && $property.classType == 'Boolean' && (!$displayFormType || $displayFormType.value == 'checkbox')) 18: ; {{html wiki="true"}} 19: <label#if ($editing) for="${prefix}$property.name"#end> 20: #if ($isCheckbox) 21: $doc.display($property.name, 'edit') 22: #end 23: $property.translatedPrettyName 24: </label> 25: {{/html}}## 26: #set ($hintKey = "${className}_${property.name}.hint") 27: #if ($services.localization.get($hintKey)) 28: (% class="xHint" %){{translation key="$hintKey"/}}## 29: #end 30: 31: #if (!$isCheckbox) 32: : #if ($editing) 33: $doc.display($property.name, 'edit') 34: #else 35: {{{$!object.getProperty($property.name).value}}} 36: #end 37: #end 38: #end 39: ))) 40: {{/velocity}}