Depuis la version < 7.1
modifié par superadmin
sur 2021/12/12 21:56
À la version 1.1 >
modifié par Administrator
sur 2013/06/04 10:05
Commentaire de modification : Import

Résumé

Détails

Icon Propriétés de la Page
Auteur du document
... ... @@ -1,1 +1,1 @@
1 -XWiki.superadmin
1 +XWiki.Admin
Icon XWiki.StyleSheetExtension[0]
Code
... ... @@ -2,7 +2,6 @@
2 2   text-align: justify;
3 3   /* Overriding of toucan value */
4 4   margin: 0;
5 - padding: 0;
6 6  }
7 7  
8 8  div#dashboardleft ol.tagCloud {
Icon XWiki.WikiMacroClass[0]
Code de la macro
... ... @@ -1,8 +1,7 @@
1 1  {{velocity}}
2 2  ##
3 3  ## tagCloudSpace - the space to display the tag cloud for. If blank, display cloud for the whole wiki. Default is blank.
4 -#set ($tagCloudSpace = $xcontext.macro.params.get('space'))
5 -#set ($tagCloudSpaces = $xcontext.macro.params.get('spaces'))
4 +#set ($tagCloudSpace = $context.macro.params.get('space'))
6 6  ##
7 7  ## Configurable popularity levels. You must enter an even number of levels. Default: 6.
8 8  #set ($popularityLevels = ["notPopular", "notVeryPopular", "somewhatPopular", "popular", "veryPopular", "ultraPopular"])
... ... @@ -10,31 +10,17 @@
10 10  ##
11 11  $xwiki.ssx.use('XWiki.TagCloud')##
12 12  ##
13 -#if( $tagCloudSpace && $tagCloudSpaces )
14 - {{error}}
15 - ##Do not use space and spaces parameter in the same time.
16 - {{translation key="xe.tag.paramerror" /}}
17 - {{/error}}
18 - #break
19 -#end
20 -
21 -##If multiple spaces with "spaces" parameter
22 -#if( $tagCloudSpaces )
23 - #set ($tagCount = $xwiki.tag.getTagCountForSpaces($tagCloudSpaces))
24 -#else
25 - ##If only one space
26 - ## Get tag count map. Key: tag, value: number of occurrences.
27 - #set ($tagCount = $xwiki.tag.getTagCount("$!tagCloudSpace"))
28 -#end
12 +## Get tag count map. Key: tag, value: number of occurrences.
13 +#set ($tagCount = $xwiki.tag.getTagCount("$!tagCloudSpace"))
29 29  ##
30 30  ## Only build popularity map if at least one tag exists
31 31  #if ($tagCount.size() > 0)
32 32   ##
33 33   ## Store the minimum and maximum number of occurrences.
34 - #set ($sortedTagCounts = $collectiontool.sort($tagCount.values()))
19 + #set ($sortedTagCounts = $sorttool.sort($tagCount.values()))
35 35   #set ($maxIndex = $sortedTagCounts.size() - 1)
36 - #set ($minCount = $sortedTagCounts[0])
37 - #set ($maxCount = $sortedTagCounts[$maxIndex])
21 + #set ($minCount = $listtool.get($sortedTagCounts, 0))
22 + #set ($maxCount = $listtool.get($sortedTagCounts, $maxIndex))
38 38   ##
39 39   ## Calculate the total number of tags in the wiki.
40 40   #set ($totalTagNumber = 0)
... ... @@ -48,12 +48,12 @@
48 48   #set ($secondHalfIntervalSize = $mathtool.div($mathtool.sub($maxCount, $countAverage), $levelsHalf))
49 49   ##
50 50   ## Use a sorted map
51 - #set ($popularityMap = $collectiontool.sortedMap)
36 + #set ($popularityMap = $collectionstool.getSortedMap())
52 52   #set ($previousPopularityMax = $minCount)
53 53   #set ($intervalSize = $firstHalfIntervalSize)
54 54   #set ($halfPassed = false)
55 55   #foreach ($popularityLevel in $popularityLevels)
56 - #if ($foreach.count > $levelsHalf && !$halfPassed)
41 + #if ($velocityCount > $levelsHalf && !$halfPassed)
57 57   #set ($intervalSize = $secondHalfIntervalSize)
58 58   #set ($halfPassed = true)
59 59   #end
... ... @@ -78,7 +78,7 @@
78 78   #end
79 79   #end
80 80   <li class="$liClass">
81 - <a class="tag" href="$xwiki.getURL('Main.Tags', 'view', "do=viewTag&amp;tag=$escapetool.url($tagEntry.Key)")" title="$services.localization.render('xe.tag.tooltip', [$tagEntry.Value])">$escapetool.xml($tagEntry.Key)</a>
66 + <a class="tag" href="$xwiki.getURL('Main.Tags', 'view', "do=viewTag&amp;tag=$escapetool.url($tagEntry.Key)")" title="$services.localization.render('xe.tag.tooltip', ["$tagEntry.Value"])">$escapetool.xml($tagEntry.Key)</a>
82 82   </li>
83 83   #end
84 84   </ol>
Icon XWiki.WikiMacroParameterClass[1]
Description du paramètre
... ... @@ -1,2 +1,0 @@
1 -Spaces to display the tag cloud for. Spaces name must be separate by "," character and "'".
2 -(i.e. spaces="'My Space','Space2'")
Paramètre obligatoire
... ... @@ -1,1 +1,0 @@
1 -0
Nom du paramètre
... ... @@ -1,1 +1,0 @@
1 -spaces
This wiki is licensed under a Creative Commons 2.0 license
XWiki 13.10 - Documentation - Conditions