Modul:Protection banner: Unterschied zwischen den Versionen
switch to using page status indicators for the padlock icons (will switch from the config sandbox in a second)
(accountcreator level is gone) |
(switch to using page status indicators for the padlock icons (will switch from the config sandbox in a second)) |
||
Zeile 12: | Zeile 12: | ||
-- Set constants. | -- Set constants. | ||
local CONFIG_MODULE = 'Module:Protection banner/config' | local CONFIG_MODULE = 'Module:Protection banner/config/sandbox' -- *** SWITCH THIS BACK BEFORE UPDATING THE MAIN MODULE *** | ||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
Zeile 825: | Zeile 825: | ||
obj._imageAlt = blurbObj:makeBannerText('alt') | obj._imageAlt = blurbObj:makeBannerText('alt') | ||
obj._imageLink = blurbObj:makeBannerText('link') | obj._imageLink = blurbObj:makeBannerText('link') | ||
obj. | obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action] | ||
or cfg. | or cfg.padlockIndicatorNames.default | ||
or ' | or 'pp-default' | ||
return setmetatable(obj, Padlock) | return setmetatable(obj, Padlock) | ||
end | end | ||
function Padlock:__tostring() | function Padlock:__tostring() | ||
return mw.getCurrentFrame():extensionTag{ | |||
name = 'indicator', | |||
args = {name = self._indicatorName}, | |||
content = self:renderImage() | |||
} | |||
end | end | ||