Änderungen von Dokument Status
Zuletzt geändert von xwikiadmin am 2024/06/24 14:35
Von Version 5.1
bearbeitet von xwikiadmin
am 2023/10/26 09:36
am 2023/10/26 09:36
Änderungskommentar:
Install extension [com.xwiki.pro:xwiki-pro-macros/1.9.2]
Auf Version 1.1
bearbeitet von xwikiadmin
am 2022/02/23 10:52
am 2022/02/23 10:52
Änderungskommentar:
Install extension [com.xwiki.pro:xwiki-pro-macros/1.2.1]
Zusammenfassung
-
Objekte (1 geändert, 0 hinzugefügt, 0 gelöscht)
Details
- XWiki.WikiMacroClass[0]
-
- Makro-Code
-
... ... @@ -1,34 +1,20 @@ 1 -{{include reference="Licenses.Code.VelocityMacros"/}}{{comment}} 2 -A comment is needed in order to skip extra spaces added and use this macro inline. 3 -{{/comment}}{{velocity}} 4 -#macro (executeMacro) 5 - #set ($discard = $xwiki.ssx.use('XWiki.Macros.Status')) 6 - #set ($color = $xcontext.macro.params.colour) 7 - #if (!$color) 8 - #set ($color = 'Grey') 9 - #end 10 - #set ($title = $xcontext.macro.params.title) 11 - #if (!$title) 12 - #set ($title = $color) 13 - #end 14 - #set ($statusCssClass = "${color.toLowerCase()}Status statusBox") 15 - #set ($subtle = $xcontext.macro.params.subtle) 16 - #set ($subtleCssClass = 'subtle') 17 - #if ($subtle == 'true') 18 - #set ($statusCssClass = "$statusCssClass subtle") 19 - #end 20 - {{html}} 21 - <span class="$statusCssClass" title="$title">$title</span> 22 - {{/html}} 1 +{{velocity}} 2 +#set ($discard = $xwiki.ssx.use('XWiki.Macros.Status')) 3 +#set ($color = $xcontext.macro.params.colour) 4 +#if (!$color) 5 + #set ($color = 'Grey') 23 23 #end 24 -## We need to check if there is a valid license because the macro is registered even if the user doesn't have view right 25 -## on the macro definition page. See XWIKI-14828: Rendering macros defined in wiki pages are available to users that 26 -## don't have view right on those pages. 27 -#if ($services.licensing.licensor.hasLicensureForEntity($xcontext.macro.doc.documentReference)) 28 - #executeMacro 29 -#else 30 - {{error}} 31 - #getMissingLicenseMessage('proMacros.extension.name') 32 - {{/error}} 7 +#set ($title = $xcontext.macro.params.title) 8 +#if (!$title) 9 + #set ($title = $color) 33 33 #end 11 +#set ($statusCssClass = "${color.toLowerCase()}Status statusBox") 12 +#set ($subtle = $xcontext.macro.params.subtle) 13 +#set ($subtleCssClass = 'subtle') 14 +#if ($subtle == 'true') 15 + #set ($statusCssClass = "$statusCssClass subtle") 16 +#end 17 +{{html}} 18 + <span class="$statusCssClass" title="$title">$title</span> 19 +{{/html}} 34 34 {{/velocity}}