Afficher les derniers auteurs
1 {{velocity}}
2 #macro (displaySearchFacetValue_space $facetPrettyValue)
3 #set ($localSpaceReference = $stringtool.removeEnd($stringtool.substringAfter($facetValue.name, '/'), '.'))
4 #set ($spaceReference = $services.model.resolveSpace($localSpaceReference))
5 #set ($spaceDocument = $xwiki.getDocument($spaceReference))
6 #if ($spaceDocument)
7 $spaceDocument.plainTitle
8 #else
9 $spaceReference.name
10 #end
11 #end
12 #macro (getSpaceFacetHierarchyPathData $spaceReference $return $options)
13 #getHierarchyPath($spaceReference $path $options)
14 #getHierarchyPathLabels($path $labels $options)
15 #set ($macro.data = [])
16 #foreach ($reference in $path)
17 #set ($url = $NULL)
18 #if ($reference.type == 'SPACE' && $foreach.index < $mathtool.sub($path.size(), 1))
19 #set ($localReference = $services.model.serialize($reference, 'local'))
20 #set ($queryStringParameters = {
21 $facetRequestParameter: "$mathtool.sub($reference.size(), 2)/${localReference}.",
22 'firstIndex': []
23 })
24 #extendQueryString($url $queryStringParameters)
25 #elseif ($reference.type == 'WIKI')
26 ## Reset the location facet.
27 #set ($queryStringParameters = {$facetRequestParameter: [], 'firstIndex': []})
28 #extendQueryString($url $queryStringParameters)
29 #end
30 #set ($discard = $macro.data.add({
31 'reference': $reference,
32 'label': $labels.get($foreach.index),
33 'url': $url
34 }))
35 #end
36 #set ($return = $NULL)
37 #setVariable("$return" $macro.data)
38 #end
39 {{html clean="false"}}
40 #set ($discard = $xwiki.ssx.use('Main.SolrSpaceFacet'))
41 #if ($facetRequestValues && $facetRequestValues.size() > 0)
42 #set ($localSpaceReference = $stringtool.removeEnd($stringtool.substringAfter($facetRequestValues.get(0), '/'), '.'))
43 #set ($spaceReference = $services.model.resolveSpace($localSpaceReference))
44 #set ($spaceFacetHierarchyOptions = {'limit': 4})
45 #getSpaceFacetHierarchyPathData($spaceReference $pathData $spaceFacetHierarchyOptions)
46 <div class="selectedLocation">
47 #displayHierarchyPath($pathData $spaceFacetHierarchyOptions)
48 </div>
49 #end
50 #retainMatchedRequestValues()
51 #displaySearchFacetValues($facetValues {} 'displaySearchFacetValue_space')
52 {{/html}}
53 {{/velocity}}
#getBlogDocument($space $blogDoc)
XWiki Enterprise 14.6 - Documentation