Afficher les derniers auteurs
1 {{template name="hierarchy_macros.vm" /}}
2
3 {{velocity}}
4 {{html clean="false"}}
5 #set ($showdata = 0)
6 <div id="searchResults">
7 #foreach ($item in $list)
8 #set ($itemReference = $item.documentReference)
9 #if (!$itemReference)
10 #set ($itemReference = $services.model.resolveDocument("$item"))
11 #end
12 #if ($services.security.authorization.hasAccess('view', $itemReference))
13 #set ($itemDoc = $xwiki.getDocument($itemReference))
14 <div class="resultItem">
15 <div class="resultContainer">
16 ##*********************************************************##
17 ## Title ##
18 ##*********************************************************##
19 <h2 class="itemTitle">
20 $services.icon.renderHTML('file-white')
21 <a href="$itemDoc.getURL()">$escapetool.xml($itemDoc.plainTitle)</a>
22 </h2>
23 ##*********************************************************##
24 ## Location ##
25 ##*********************************************************##
26 <div class="itemLocation">
27 $services.localization.render('search.item.locatedIn')
28 #set ($locationOptions = {
29 'excludeSelf': true,
30 'limit': 6
31 })
32 #hierarchy($itemReference $locationOptions)
33 </div>
34 ##*********************************************************##
35 ## Modifiers - content update date ##
36 ##*********************************************************##
37 <div class="itemModified">
38 $services.localization.render('search.item.modified', [
39 $xwiki.getUserName($itemDoc.authorReference),
40 $xwiki.formatDate($itemDoc.date)
41 ])
42 </div>
43 ##*********************************************************##
44 ## Rating ##
45 ##*********************************************************##
46 <div class="itemOthers">
47 #if ($services.ratings)
48 #set ($avarageRating = $services.ratings.getAverageRating($itemReference).averageVote)
49 #set ($percentageRating = $avarageRating * 20)
50 <span class="itemRating" title="$services.localization.render('search.item.rating.title')">
51 <span class="currentRating" style="width:$percentageRating%;"></span>
52 </span>
53 #end
54 </div>
55 </div> ## resultContainer
56 </div> ## resultItem
57 #end ## hasAccess
58 #end ## foreach item
59 </div> ## searchResults
60 {{/html}}
61 {{/velocity}}
#getBlogDocument($space $blogDoc)
XWiki Enterprise 14.6 - Documentation