Zmeny dokumentu License JSON

Naposledy upravil Admin-metais MetaIS 2025/05/28 21:41

Z verzie 2.1
Zmeniť komentár: Install extension [com.xwiki.licensing:application-licensing-licensor-ui/1.29]
Do verzie 1.1
Zmeniť komentár: Install extension [com.xwiki.licensing:application-licensing-licensor-ui/1.26]

Súhrn

Podrobnosti

Vlastnosti stránky
Obsah
... ... @@ -1,14 +1,7 @@
1 1  {{include reference="Licenses.Code.VelocityMacros"/}}
2 2  
3 3  {{velocity output="false"}}
4 -#macro(getExtensionParentNames $licensedExtensionParents $extensionParentNames)
5 - #set ($extensionParents = $collectiontool.set)
6 - #foreach ($parent in $licensedExtensionParents)
7 - #set ($discard = $extensionParents.add($parent.getExtensionName()))
8 - #end
9 - #set ($extensionParentNames = $stringtool.join($extensionParents, ', '))
10 -#end
11 -#macro (addPaidExtensionRow $extension $rows $licensedDependenciesMap)
4 +#macro (addPaidExtensionRow $extension $rows)
12 12   #set ($license = $services.licensing.licensor.getLicenseForExtension($extension.id))
13 13   ##
14 14   ## Expiration Date
... ... @@ -70,9 +70,7 @@
70 70   #end
71 71   #set ($namespaces = $collectiontool.sort($namespaces))
72 72   ##
73 - ## Extension name. A warning will be displayed for extensions installed as depedencies.Note
74 - ## that we consider optional depedencies as being not covered by the license of the parent
75 - ## extension, as they can be uninstalled, so a warning will be displayed for them.
66 + ## Other
76 76   ##
77 77   #set ($queryString = $escapetool.url({
78 78   'instanceId': $services.instance.instanceId,
... ... @@ -83,28 +83,14 @@
83 83   'email': $ownerObj.getValue('email')
84 84   }))
85 85   #set ($documentationURL = "${storeAccessURL}?${queryString}")
86 - #set ($extensionName = "<a href=""$documentationURL"" target='_blank'>$extension.name</a>")
87 - #set ($licensedExtensionParents = $licensedDependenciesMap.get($extension.id.id))
88 - #if ($licensedExtensionParents && $licensedExtensionParents.size() > 0)
89 - #getExtensionParentNames($licensedExtensionParents $extensionParentNames)
90 - #set ($requiredByTitle = $escapetool.xml($services.localization.render(
91 - 'licensor.installedAsDependency.value.requiredBy')) + $extensionParentNames)
92 - #set ($extensionNameValue = "$services.icon.renderHTML('warning') ${extensionName}")
93 - #set ($extensionName = "<span class='required-by-info' data-parent-extensions=""$extensionParentNames""
94 - title=""$requiredByTitle"">${extensionNameValue}</span>")
95 - #end
96 - ##
97 - ## Rows
98 - ##
99 99   #set ($discard = $rows.add({
100 100   'doc_viewable': true,
101 - 'name': $extensionName,
79 + 'name': $extension.name,
102 102   'name_url': $documentationURL,
103 103   'version': $extension.id.version.toString(),
104 104   'status': $expDate,
105 105   'support': $support,
106 106   'userLimit': $userLimit,
107 - 'installedAsDependency': $installedAsDependency,
108 108   'wiki': $stringtool.join($namespaces, ', '),
109 109   'actions': "#licenseActions($license $extension)"
110 110   }))
... ... @@ -115,19 +115,16 @@
115 115  #if ($xcontext.action == 'get')
116 116   #set ($discard = $response.setContentType('application/json'))
117 117  #end
118 -#getVisiblePaidExtensions
119 -#if ($request.showTopLevelExtensions == true)
120 - #set ($extensions = $visiblePaidExtensions)
121 -#else
95 +#if ($request.showAllPaidExtensions == 'true')
122 122   #getPaidExtensions
123 123   #set ($extensions = $paidExtensions)
98 +#else
99 + #getVisiblePaidExtensions
100 + #set ($extensions = $visiblePaidExtensions)
124 124  #end
125 -#set ($licensedDependenciesMap = $services.licensing.licensor.getLicensedExtensionManager().getLicensedDependenciesMap())
126 126  #set ($rows = [])
127 127  #foreach ($extension in $extensions)
128 - #if ($extension.type != 'jar')
129 - #addPaidExtensionRow($extension $rows $licensedDependenciesMap)
130 - #end
104 + #addPaidExtensionRow($extension $rows)
131 131  #end
132 132  #set ($rows = $collectiontool.sort($rows, 'name'))
133 133  #set ($offset = $mathtool.sub($numbertool.toNumber($request.offset).intValue(), 1))