/
LiveTableResults.xml
69 lines (66 loc) · 3.16 KB
/
LiveTableResults.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?xml version="1.1" encoding="UTF-8"?>
<!--
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<xwikidoc version="1.3" reference="XWiki.LiveTableResults" locale="">
<web>XWiki</web>
<name>LiveTableResults</name>
<language/>
<defaultLanguage/>
<translation>0</translation>
<creator>xwiki:XWiki.Admin</creator>
<parent>XWiki.WebHome</parent>
<author>xwiki:XWiki.Admin</author>
<contentAuthor>xwiki:XWiki.Admin</contentAuthor>
<version>1.1</version>
<title>$services.localization.render('platform.livetable.results')</title>
<comment/>
<minorEdit>false</minorEdit>
<syntaxId>xwiki/2.0</syntaxId>
<hidden>true</hidden>
<content>{{include reference="XWiki.LiveTableResultsMacros" /}}
{{velocity wiki="false"}}
## the $extra variable is passed to the call to #gridresultwithfilter below and is used to perform some default
## filtering on the LiveTable data even when the user has not performed any column filtering yet.
## When users start using column filtering, the generated DB query will combine both the default filtering and what the
## user has entered in the column filters.
#set ($extra = '')
#set ($params = {})
#if ("$!request.space" != '')
#set ($extra = "${extra} AND doc.space = :doc_space")
#set ($discard = $params.put('doc_space', $request.space))
#end
## Use filterLocation since addLivetableLocationFilter is buggy when called several times (it'll add the
## same HQL binding name every time it's called! See https://jira.xwiki.org/browse/XWIKI-17463).
## Also note that we don't call addLocationFilter since we use a Map for $params.
#filterLocation($extra, $params, $!request.location, 'locationFilterValue1')
#if ("$!request.parent" != '')
#set ($extra = "${extra} and doc.parent = :doc_parent")
#set ($discard = $params.put('doc_parent', $request.parent))
#end
#if ("$!request.orphaned" == '1')
#set ($homepage = $services.wiki.getById($services.wiki.currentWikiId).mainPageReference)
#set ($homepageFullName = $services.model.serialize($homepage, 'local'))
## On Oracle the empty parent is actually null.
#set ($extra = "${extra} and (doc.parent = '' or doc.parent is null) and doc.fullName <> :homepageFullName")
#set ($discard = $params.put('homepageFullName', $homepageFullName))
#end
#gridresultwithfilter("$!request.classname" $request.collist.split(',') '' "${extra}" $params)
{{/velocity}}</content>
</xwikidoc>