Wiki zdrojový kód pre LicensesNotificationsUIX
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{include reference="Licenses.Code.VelocityMacros" /}} | ||
2 | |||
3 | {{velocity}} | ||
4 | #if ($hasAdmin && $hasProgramming) | ||
5 | #getVisiblePaidExtensions | ||
6 | ## The same extension could be installed on multiple namespaces (wikis) with different versions. | ||
7 | #set ($extensionNames = $collectiontool.sortedSet) | ||
8 | #set ($limit = 3) | ||
9 | #set ($showMore = false) | ||
10 | #foreach ($extension in $visiblePaidExtensions) | ||
11 | #if (!$services.licensing.licensor.hasLicensureForExtension($extension.id)) | ||
12 | #if ($extensionNames.size() < $limit) | ||
13 | #set ($discard = $extensionNames.add($escapetool.xml($extension.name))) | ||
14 | #else | ||
15 | #set ($showMore = true) | ||
16 | #break | ||
17 | #end | ||
18 | #end | ||
19 | #end | ||
20 | #if ($showMore || $extensionNames.size() > 0) | ||
21 | #set ($discard = $xwiki.ssx.use('Licenses.Code.LicensesNotificationsUIX')) | ||
22 | #if (!$missingLicensesWrapperTagName) | ||
23 | #set ($missingLicensesWrapperTagName = 'div') | ||
24 | #end | ||
25 | {{html clean=false}} | ||
26 | <$missingLicensesWrapperTagName class="notifications-missingLicenses errormessage"> | ||
27 | <p>$services.localization.render('licensor.missingLicenses', ["<a href='#getLicensesAdminSectionURL'>", | ||
28 | '</a>'])</p> | ||
29 | <ul> | ||
30 | <li>$stringtool.join($extensionNames, '</li><li>')</li> | ||
31 | #if ($showMore) | ||
32 | <li>...</li> | ||
33 | #end | ||
34 | </ul> | ||
35 | </$missingLicensesWrapperTagName> | ||
36 | {{/html}} | ||
37 | #end | ||
38 | #end | ||
39 | {{/velocity}} |