Module:Protection banner: Difference between revisions
Undid revision 653638001 by Edokter (talk) Getting weird error!
(Redo switch to <indicator> in concert with {{top icon}}) |
|||
Line 825: | Line 825: | ||
obj._imageAlt = blurbObj:makeBannerText('alt') | obj._imageAlt = blurbObj:makeBannerText('alt') | ||
obj._imageLink = blurbObj:makeBannerText('link') | obj._imageLink = blurbObj:makeBannerText('link') | ||
obj. | obj._right = cfg.padlockPositions[protectionObj.action] | ||
or cfg. | or cfg.padlockPositions.default | ||
or ' | or '55px' | ||
return setmetatable(obj, Padlock) | return setmetatable(obj, Padlock) | ||
end | end | ||
function Padlock:__tostring() | function Padlock:__tostring() | ||
local root = mw.html.create('div') | |||
root | |||
:addClass('metadata topicon nopopups') | |||
:attr('id', 'protected-icon') | |||
:css{display = 'none', right = self._right} | |||
:wikitext(self:renderImage()) | |||
return tostring(root) | |||
end | end | ||