Windows Xwiki 10.3 Install Notes
Thursday, May 17, 2018
4:21 PM
Server Setup
Deploy windows 2016 image
Configure pagefile drive (d:_
Add new disk e:\ (50gb)
Install java (8 currently supported)
Tomcat/XWiki Setup
Install tomcat 9 windows service, update install path to E:\ (e.g. E:\Apache Software Foundation\Tomcat 9.0)
Edit tomcat/conf/server.xml
-Update connector ports (change 8080 references to 80 for initial configuration, setup ssl later)
Create service account in environment (e.g. polarisind\svcxwiki01)
Add service account as local admin in ad group for server (probably not necessary but easier)
Have DBAs create database Xwiki somewhere, grant dbo access to service account
Stop tomcat service
Download xwiki.war from xwiki.org (10.3 currently)
Rename download to ROOT.war
Copy ROOT.war to TomcatInstallPath\Webapps
Delete existing root folders:
-TomcatInstallPath \Webapps\ROOT
-TomcatInstallPath \work\catalina\localhost\ROOT
Start tomcat, will extract ROOT.war as new root app
(wait 1 min for auto deploy to finish)
Stop tomcat
Reconfigure tomcat service to use created service account
Edit TomcatInstallPath\webapps\ROOT\hibernate.cfg.xml
Comment out existing db config, use mssql config below:
<property name="connection.url">jdbc:sqlserver://SERVERFQDN:1433;DatabaseName=XWiki;integratedSecurity=true;</property>
<property name="connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.mssql.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
Download microsoft jdbc driver, extract to program files.
Copy jdbc_xxx.jar from the extract location that matches installed jre version (likely 8) to TomcatInstallPath\webapps\ROOT\WEB-INF\lib
Copy sqljdbc_auth.dll from the extract location and copy to c:\windows\system32 (or add it to PATH but this way is easier)
Create XWikiFiles directory outside of tomcat director and give full perms to the service account
Update TomcatInstallPath\webapps\ROOT\WEB-INF\xwiki.properties:
environment.permanentDirectory=E:\XWikiFiles
Update xwiki.cfg:
xwiki.webapppath=
Delete TomcatInstallPath\work\Catalina\localhost directory
Start tomcat
(Wait 1min)
Browse to server on configured port should start xwiki distribution setup
Create admin account "Xwiki admin, username admin, password admin (or whatever)"
Select Xwiki Standard flavor, Install
Hit next/ok if necessary until complete
Install done
Open Office Setup
Download & install openoffice
Download 2003 resource kit and get srvany.exe (doesn’t have to be on this machine) or copy from existing xwiki window server
Copy srvany.exe to c:\windows\system32
Create open office service:
sc create "ooservice" binPath= "\"C:\Windows\System32\srvany.exe\"" DisplayName= "OpenOffice Server" start= auto
Navigate to the key HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\ooservice
Create a new key named "Parameters".
For the new key "Parameters", create a string value named "Application" with following value.
"C:\Program Files (x86)\OpenOffice 4\program\soffice.exe" -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
Start openoffice service
Update TomcatInstallPath\webapps\ROOT\xwiki.properties
openoffice.serverType=1
openoffice.autoStart=true
Add tomcat folder windows defender exclusion (seems to cause high cpu)?
Customization
Login, change theme to charcoal
Edit skin upload logo
LDAP Configuration
**SCRUB**
Save
Edit tomcat\webapps\root\web-inf\xwiki.cfg
xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl
Save restart tomcat
Rights Configuration
**SCRUB**
Email settings
**SCRUB**
Edit wiki name
**SCRUB**
CUSTOMIZATION
The settings below hide the system pages and uses Home as the root
http://**SCRUB**/bin/inline/Panels
Create new panel "HOME", then rename it when configuring:
Name: Navigation
Panel type: view
Category: Navigation
Description: CUSTOM Nav
Content:
{{velocity}}
#panelheader($services.localization.render('xe.panels.navigation'))
## Escape special characters in macro parameter values.
#set ($openToDoc = $doc.documentReference.toString().replaceAll('([~"])', '~$1'))
{{documentTree showTranslations="false" showAttachments="false" compact="true" limit="20" showRoot="true" root="document:xwiki:Main.WebHome" openTo="document:$openToDoc" /}}
#panelfooter()
{{/velocity}}
Save
Goto admin>look and feel>panels
Change to left column only
Change panels displayed on left to Panels.Home
Save
Goto admin>look and feel>panels
Customize default skin
Edit
Add/Set/upload logo
Create 3 new override templates (below)
hierarchy_macros.vm:
#template('documentTree_macros.vm')
#**
* Display the path of the specified entity within the hierarchy.
*
* @param $entityReference the entity for which to display the hierarchy path, defaults on the current document
* @param $options various configuration options; see #getHierarchyPath() and #displayHierarchyPath()
*#
#macro (hierarchy $entityReference $options)
#if (!$options)
#set ($options = {})
#else
## We need to assign the options to a variable in case the user has passed a literal map.
#set ($options = $options)
#end
#if (!$entityReference)
## Default on the current (translated) document.
#set ($entityReference = $tdoc.documentReference)
#if ($entityReference.name == $services.model.getEntityReference('DOCUMENT', 'default').name)
## The current document is a space home page. Use the space reference instead. This is important for preview mode
## and when editing a document section because $tdoc needs to be mapped to the right entity reference in the
## 'entities' configuration option.
#set ($entityReference = $entityReference.parent)
#end
#if (!$options.entities)
#set ($discard = $options.put('entities', {}))
#end
#set ($discard = $options.entities.put($entityReference, $tdoc))
#end
#getHierarchyPath($entityReference $path $options)
#if ($options.plain)
#getHierarchyPathLabels($path $labels $options)
$stringtool.join($labels, ' / ')
#else
#getHierarchyPathData($path $data $options)
## At this point, we need to know the *document* actually pointed by the breadcrumb to give the correct reference
## to #displayHierarchyPath(), which displays this reference as hidden data.
#if ($entityReference.type == 'SPACE')
#set ($entityReference = $services.model.createEntityReference('WebHome', 'DOCUMENT', $entityReference))
#end
#displayHierarchyPath($data $options $entityReference)
#end
#end
#**
* Compute the path of the specified entity within the hierarchy.
*
* @param $entityReference the entity for which to compute the path
* @options various configuration options; default values are {
* local: false, // whether to compute the local path or not (i.e. including the wiki reference or not)
* excludeSelf: false, // whether to exclude the passed reference from the path
* limit: 0 // the maximum number of path elements (limit/2 on the left and the rest of the right)
* }
*#
#macro (getHierarchyPath $entityReference $return $options)
#if (!$options)
#set ($options = {})
#end
#set ($macro.path = [])
#set ($discard = $macro.path.addAll($entityReference.reversedReferenceChain))
#if ($macro.path.get(0).type == 'WIKI')
#set ($wikiName = $macro.path.get(0).name)
#if ($options.local)
## Remove the wiki reference.
#set ($discard = $macro.path.remove(0))
#elseif ($wikiName != $xcontext.mainWikiName
&& $xcontext.userReference.wikiReference.name == $xcontext.mainWikiName
&& $services.wiki.user.getUserScope($wikiName) != 'LOCAL_ONLY')
## Global users should be able to navigate to the main wiki from a subwiki that accepts global users.
#set ($discard = $macro.path.add(0, $services.model.createWikiReference($xcontext.mainWikiName)))
#end
#end
## Merge the space reference with the space home page reference.
#foreach ($reference in $macro.path)
#if ($reference.type == 'DOCUMENT' && $foreach.index > 0
&& $reference.name == $services.model.getEntityReference('DOCUMENT', 'default').name
&& $macro.path.get($mathtool.sub($foreach.index, 1)).type == 'SPACE')
#set ($discard = $macro.path.remove($reference))
#break
#end
#end
#if ($options.excludeSelf)
## Remove the last reference.
#set ($discard = $macro.path.remove($mathtool.sub($macro.path.size(), 1)))
#end
## Limit the number of path elements (by removing elements in the middle of the path).
#set ($size = $macro.path.size())
#if ($options.limit && $options.limit > 0 && $options.limit < $size)
#set ($left = $options.limit / 2)
#set ($right = $size - ($options.limit - $left))
#set ($limitedPath = [])
#set ($discard = $limitedPath.addAll($macro.path.subList(0, $left)))
#set ($discard = $limitedPath.add({'type': 'ellipsis'}))
#set ($discard = $limitedPath.addAll($macro.path.subList($right, $size)))
#set ($macro.path = $limitedPath)
#end
#set ($return = $NULL)
#setVariable("$return" $macro.path)
#end
#**
* Displays a hierarchy path computed with #getHierarchyPathData().
*
* @param $pathData the data of the hierarchy path to display
* @param $options various display options; default values are {
* id: null, // the value of the id attribute to set on the container element
* excludeSelf: false, // whether the target reference has been excluded from the path
* selfIsActive: true, // whether the target reference should be marked as active or not
* limit: null // if any, enable the user to click on the ellipsis to expand the breadcrumb dynamically
* }
* @param $entityReference (required if $option.limit is not null) the reference to the concerned entity.
*#
#macro (displayHierarchyPath $pathData $options $entityReference)
#if (!$options)
#set ($options = {})
#end
#set ($breadCrumbClassNames = 'breadcrumb')
#set ($breadCrumbParameters = '')
#if ($options.limit)
#set ($discard = $xwiki.jsfx.use('uicomponents/hierarchy/hierarchy.js', {'forceSkinAction': true}))
## Tag the breadcrumb as expandable, so the JS can enable the 'expand' feature
#set ($breadCrumbClassNames = "${breadCrumbClassNames} breadcrumb-expandable")
## Store the entity reference into the breadcrumb, so the JS can retreive the full hierarchy
#set ($breadCrumbParameters = "data-entity='$escapetool.xml($services.model.serialize($entityReference, 'local'))'")
## Store the options into the breadcrumb, so the JS can have all informations
#foreach ($option in $options.keySet())
#set ($breadCrumbParameters = "$breadCrumbParameters data-${option.toLowerCase()}='$escapetool.xml($options.get($option))'")
#end
#end
<ol #if("$!options.id" != '')id="$options.id"#end class="$breadCrumbClassNames" $breadCrumbParameters><li
#foreach ($item in $pathData)
#set ($classNames = $collectionstool.set)
#set ($discard = $classNames.add($item.reference.type.toString().toLowerCase()))
#if ($item.classNames)
#set ($discard = $classNames.addAll($item.classNames))
#end
#getTreeNavigation($pathData $foreach.index $options)
## Avoid whitespace characters between the list items (they are visible when display=inline-block).
#set ($closingTag = '</li><li')
#if ($foreach.index == $mathtool.sub($pathData.size(), 1))
#if (!$options.excludeSelf && "$!options.selfIsActive" != 'false')
#set ($discard = $classNames.add('active'))
#end
#set ($closingTag = '')
#end
class="$stringtool.join($classNames, ' ')">#if ($item.url)<a href="$item.url"
>#end$item.label#if ($item.url)</a>#end$treeNavigation$closingTag##
#end##
</li></ol>
#end
#macro (getTreeNavigation $pathData $index $options)
#set ($treeNavigation = '')
#if ($isDocumentTreeAvailable && $options.treeNavigation && $pathData.get($index).reference.type != 'ellipsis')
#set ($discard = $classNames.add('dropdown'))
## Open the tree to an intermediary path element, showing its siblings and its children.
#set ($openToIndex = $index)
#if ($index == 0)
## Open the tree to the last path element (e.g. when you click on the home icon).
#set ($openToIndex = $mathtool.sub($pathData.size(), 1))
#end
#set ($openTo = $pathData.get($openToIndex).reference)
#if ($openTo.type == 'SPACE' && !$services.parentchild.isParentChildMechanismEnabled())
## The tree shows nested documents.
#set ($openTo = $services.model.resolveDocument('', 'default', $openTo))
#end
#set ($openToType = $openTo.type.toString().toLowerCase())
#set ($openToId = "$openToType:$services.model.serialize($openTo, 'default')")
#set ($rootId = $NULL)
#if ($index > 0 && $openTo.type != 'WIKI')
#set ($root = $pathData.get($mathtool.sub($index, 1)).reference)
#if ($root.type == 'ellipsis')
## $openTo may have been converted to a document reference above so we take the parent from its initial value.
#set ($root = $pathData.get($openToIndex).reference.parent)
#end
#if ($root.type == 'SPACE' && !$services.parentchild.isParentChildMechanismEnabled())
## The tree shows nested documents.
#set ($root = $services.model.resolveDocument('', 'default', $root))
#end
#set ($rootType = $root.type.toString().toLowerCase())
#set ($rootId = "$rootType:$services.model.serialize($root, 'default')")
#end
## Show the wiki nodes if the first path element is from a different wiki (e.g. the home icon points to the main
## wiki while the last path element points to a document from a subwiki).
#set ($showWikis = $pathData.get(0).reference.extractReference('WIKI') != $openTo.extractReference('WIKI'))
## FIXME: The tree navigation should take into account the current hierarchy mode.
## FIXME: Make sure the tree shows entities of type $root.type and $openTo.type
#set ($treeParams = {
'class': 'breadcrumb-tree',
'limit': 20,
'links': true,
'openTo': $openToId,
'showRoot': true,
'root': 'document:xwiki:Main.WebHome',
'showTranslations': false,
'showWikis': false
})
#set ($treeToggle = "<span class='dropdown-toggle' data-toggle='dropdown'>" +
"$services.icon.renderHTML('caret-down')</span>")
#set ($treeNavigation = "$treeToggle<div class='dropdown-menu'>#documentTree($treeParams)</div>")
#end
#end
#macro (getHierarchyPathData $path $return $options)
#if (!$options)
#set ($options = {})
#end
#getHierarchyPathLabels($path $labels $options)
#set ($macro.data = [])
#foreach ($reference in $path)
#set ($url = $NULL)
#getHierarchyPathData_url($reference)
#set ($discard = $macro.data.add({
'reference': $reference,
'label': $labels.get($foreach.index),
'url': $url
}))
#end
#set ($return = $NULL)
#setVariable("$return" $macro.data)
#end
#macro (getHierarchyPathData_url $reference)
#if ($reference.type == 'OBJECT')
#if ($services.security.authorization.hasAccess('edit', $reference))
#if ($reference.objectNumber)
#set ($objectNumber = $reference.objectNumber)
#set ($objectType = $services.model.serialize($reference.xClassReference, 'local'))
#else
#set ($objectNumber = $stringtool.substringAfterLast($stringtool.removeEnd($reference.name, ']'), '['))
#set ($objectType = $stringtool.substringBeforeLast($reference.name, '['))
#end
#set ($url = $xwiki.getURL($reference, 'edit', $escapetool.url({
'editor': 'object',
'classname': $objectType,
'object': $objectNumber
})))
#end
#elseif ($reference.type != 'ellipsis' && $services.security.authorization.hasAccess('view', $reference))
#set ($url = $xwiki.getURL($reference))
#end
#end
#**
* Collects the labels of the entities from the given path.
*
* @param $path a path in the hierarchy
* @param $options various display options; default values are {
* entities: {}, // a map of (reference, entity) pairs holding unsaved entities that should be used for display
* plain: false, // whether to use plain text or HTML
* displayTitle: true // whether to display the title of the documents or the reference name
*#
#macro (getHierarchyPathLabels $path $return $options)
#if (!$options)
#set ($options = {})
#end
#set ($macro.labels = [])
#foreach ($reference in $path)
#set ($label = $escapetool.xml($reference.name))
#if (($reference.type == 'SPACE' || $reference.type == 'DOCUMENT') && "$!options.displayTitle" != 'false')
## Check if there is an unsaved document with this reference.
#set ($document = $options.entities.get($reference))
#if (!$document)
## Get the saved document.
#set ($document = $xwiki.getDocument($reference).translatedDocument)
#end
#if ($document)
#set ($label = $escapetool.xml($document.plainTitle))
#end
#elseif ($reference.type == 'WIKI')
#if ($foreach.index == 0 && !$options.plain)
#if ($services.icon)
#set ($label = $services.icon.renderHTML('home'))
#else
## Fallback on the Silk icon set for now as it is bundled by default.
#set ($label = "<img src=""$xwiki.getSkinFile('icons/silk/house.png')"" />")
#end
#else
#set ($wikiPrettyName = $services.wiki.getById($reference.name).prettyName)
#if ("$!wikiPrettyName" != '')
#set ($label = $escapetool.xml($wikiPrettyName))
#end
#end
#elseif ($reference.type == 'ellipsis')
#if ($options.plain)
#set ($label = '...')
#else
#set ($label = '…')
#end
#end
#set ($discard = $macro.labels.add($label))
#end
#set ($return = $NULL)
#setVariable("$return" $macro.labels)
#end
#*
* Display the parents of a document based on the old parent/child mechanism.
*#
#macro (hierarchy_parentChild)
#if ("$!doc.parent" != '' || $xcontext.action == 'edit' || $xcontext.action == 'inline')
#set ($path = [])
#set ($discard = $path.addAll($services.parentchild.getParentsBasedOnParentChildRelationship($doc.documentReference)))
#set ($discard = $path.add($doc.documentReference))
#set ($options = {
'id': 'hierarchy',
'entities': {
$doc.documentReference: $tdoc
}
})
#getHierarchyPathData($path $data $options)
#displayHierarchyPath($data $options)
#end
#end
locationPicker_macros.vm:
#template('hierarchy_macros.vm')
#set ($displayWikiFields = $xcontext.userReference.wikiReference.name == $xcontext.mainWikiName && $xwiki.hasSubWikis())
#macro (locationPicker $options)
#set ($discard = $xwiki.get('jsfx').use('uicomponents/widgets/validation/livevalidation_prototype.js'))
#set ($discard = $xwiki.get('ssfx').use('uicomponents/widgets/validation/livevalidation.css', true))
#set ($discard = $xwiki.get('jsfx').use('uicomponents/widgets/locationPicker.js', true))
#set ($discard = $xwiki.get('ssfx').use('uicomponents/widgets/locationPicker.css', true))
<dl class="location-picker">
##
## ---------------------------------------------------------------------------------------------------------
## Title field
## ---------------------------------------------------------------------------------------------------------
##
#set ($titleField = $options.title)
#set ($value = $request.getParameter($titleField.name))
#if (!$value)
#set ($value = $titleField.value)
#end
#set ($escapedValue = $escapetool.xml($value))
#if ($titleField.label)
<dt>
<label for="$!{options.id}Title">$services.localization.render($titleField.label)</label>
<span class="xHint">$!services.localization.render($titleField.hint)</span>
</dt>
<dd>
<input type="text" id="$!{options.id}Title" name="$titleField.name" value="$!escapedValue"
class="location-title-field" placeholder="$!services.localization.render($titleField.placeholder)" />
</dd>
#elseif ($titleField)
<dt class="hidden"></dt>
<dd class="hidden">
<input type="hidden" name="$titleField.name" value="$!escapedValue"
class="location-title-field" />
</dd>
#end
##
## ---------------------------------------------------------------------------------------------------------
## Location preview
## ---------------------------------------------------------------------------------------------------------
##
<dt>
<label>$services.localization.render($options.preview.label)</label>
<span class="xHint">$services.localization.render($options.preview.hint)</span>
</dt>
<dd>
#if ($isDocumentTreeAvailable)
#documentPickerModal($options)
#locationPickerActions
#end
## The breadcrumb is updated whenever the user changes the parent page. This causes the breadcrumb element to be
## constantly replaced, preventing us from displaying the live validation message after it. In order to overcome
## this, we wrap the breadcrumb element in a DIV that remains the same.
<div class="breadcrumb-container">
## Note: We display only the parent reference here. The new document part will be added from JavaScript.
#hierarchy($options.parent.reference)
</div>
##
## ---------------------------------------------------------------------------------------------------------
## Location advanced edit
## ---------------------------------------------------------------------------------------------------------
##
#locationAdvancedEdit($options)
</dd>
</dl>
#end
#macro (locationPickerActions)
<div class="location-actions">
## Tree picker toggle
<a href="#" class="location-action location-action-pick" title="Select a new location">
$services.icon.renderHTML('chart-organisation')</a>
## Location advanced edit button.
#if ($isAdvancedUser)
<a href="#" class="location-action location-action-edit">
$services.icon.renderHTML('pencil')
</a>
#end
</div>
#end
#macro (locationAdvancedEdit $options)
<div class="location-edit#if ($isDocumentTreeAvailable) hidden#end">
<dl>
## ---------------------------------------------------------------------------------------------------------
## Wiki field
## ---------------------------------------------------------------------------------------------------------
#set ($wikiField = $options.wiki)
#set ($value = $request.getParameter($wikiField.name))
#if (!$value)
#set ($value = $wikiField.value)
#end
#set ($escapedValue = $escapetool.xml($value))
#if ($wikiField.label && $displayWikiFields)
<dt>
<label for="$!{options.id}Wiki">$services.localization.render($wikiField.label)</label>
<span class="xHint">$!services.localization.render($wikiField.hint)</span>
</dt>
<dd>
<select id="$!{options.id}Wiki" name="$wikiField.name" class="location-wiki-field">
#set ($wikis = $xwiki.wikiNames)
#foreach ($wiki in $wikis)
#set ($wikiPrettyName = $services.wiki.getById($wiki).prettyName)
#if ("$!wikiPrettyName.trim()" == '')
#set ($wikiPrettyName = $wiki)
#end
<option value="$!escapetool.xml($wiki)" #if ($wiki == $value) selected="selected" #end>
$!escapetool.xml($wikiPrettyName)
</option>
#end
</select>
</dd>
#elseif ($wikiField)
<dt class="hidden"></dt>
<dt class="hidden">
<input type="hidden" name="$wikiField.name" class="location-wiki-field" value="$!escapedValue" />
</dt>
#end
## ---------------------------------------------------------------------------------------------------------
## Parent Reference field
## ---------------------------------------------------------------------------------------------------------
##
#set ($parentField = $options.parent)
#set ($value = $request.getParameter($parentField.name))
#if (!$value)
#if ("$!parentField.reference" == '')
## Default to the current document's space.
#set ($defaultParentReference = $doc.documentReference.lastSpaceReference)
#else
#set ($defaultParentReference = $parentField.reference)
#end
## Make sure to use the local serialized string reference.
## Note: If the parent is a wiki reference, an empty value will be set in the input.
#set ($defaultParentReferenceString = $services.model.serialize($defaultParentReference, 'local'))
#set ($value = $defaultParentReferenceString)
#end
#set ($escapedValue = $escapetool.xml($value))
<dt>
<label for="$!{options.id}ParentReference">$services.localization.render($parentField.label)</label>
<span class="xHint">$!services.localization.render($parentField.hint)</span>
</dt>
<dd>
<input type="text" id="$!{options.id}ParentReference" class="location-parent-field suggestSpaces"
name="$parentField.name" value="$!escapedValue"
placeholder="$!services.localization.render($parentField.placeholder)" />
</dd>
##
## ---------------------------------------------------------------------------------------------------------
## Name field
## ---------------------------------------------------------------------------------------------------------
##
#set ($nameField = $options.name)
#set ($value = $request.getParameter($nameField.name))
#if (!$value)
#set ($value = $nameField.value)
#end
#set ($escapedValue = $escapetool.xml($value))
#if ($nameField.label)
<dt>
<label for="$!{options.id}Name">$services.localization.render($nameField.label)</label>
<span class="xHint">$!services.localization.render($nameField.hint)</span>
</dt>
<dd>
<input type="text" id="$!{options.id}Name" name="$nameField.name" class="location-name-field"
value="$!escapedValue"
placeholder="$!services.localization.render($nameField.placeholder)" />
</dd>
#elseif ($nameField)
<dt class="hidden"></dt>
<dd class="hidden">
<input type="hidden" name="$nameField.name" class="location-name-field"
value="$!escapedValue" />
</dd>
#end
</dl>
</div>
#end
#macro (documentPickerModal $options)
<div class="modal fade" tabindex="-1" role="dialog" data-backdrop="static">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">$services.localization.render('core.documentPicker.title')</h4>
</div>
<div class="modal-body">
#set ($showWikis = $options.wiki && $displayWikiFields)
## If we don't show the wikis then we need to show the root node (the current wiki) in order to be able to
## target top level documents (e.g. create a top level document, move a document to the top level, etc.).
#set ($showRoot = !$showWikis)
#set ($showTerminalDocuments = false || $options.showTerminalDocuments)
#documentTree({
'class': 'location-tree',
'finder': true,
'showAttachments': false,
'showRoot': true,
'root': 'document:xwiki:Main.WebHome',
'showTerminalDocuments': $showTerminalDocuments,
'showTranslations': false,
'showWikis': $showWikis
})
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">
$services.localization.render('core.documentPicker.cancel')
</button>
<button type="button" class="btn btn-primary" disabled="disabled">
$services.localization.render('core.documentPicker.select')
</button>
</div>
</div>
</div>
</div>
#end
NEXT TEMPLATE CONTINUED BELOW