"ماڈیول:Message box" کے نسخوں کے درمیان فرق

add templatestyles, remove a variable or two as a result
م 73 revisions imported
ٹیگ: موبائل ترمیم موبائل ویب ترمیم
 
(5 صارفین 6 کے درمیانی نسخے نہیں دکھائے گئے)
سطر 1: سطر 1:
require('Module:No globals')
require('strict')
local getArgs
local getArgs
local yesno = require('Module:Yesno')
local yesno = require('Module:Yesno')
سطر 155: سطر 155:
self.typeClass = typeData.class
self.typeClass = typeData.class
self.typeImage = typeData.image
self.typeImage = typeData.image
self.typeImageNeedsLink = typeData.imageNeedsLink


-- Find if the box has been wrongly substituted.
-- Find if the box has been wrongly substituted.
سطر 187: سطر 188:
-- Set text style.
-- Set text style.
self.textstyle = args.textstyle
self.textstyle = args.textstyle
-- Set image classes.
self.imageRightClass = args.imagerightclass or args.imageclass
self.imageLeftClass = args.imageleftclass or args.imageclass


-- Find if we are on the template page or not. This functionality is only
-- Find if we are on the template page or not. This functionality is only
سطر 263: سطر 268:
                 local talkText
                 local talkText
                 if self.isSmall then
                 if self.isSmall then
                     local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk)
                     local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. (talk == '#' and '' or '#') .. talk)
                     talkText = string.format('([[%s|talk]])', talkLink)
                     talkText = string.format('([[%s|talk]])', talkLink)
                 else
                 else
سطر 276: سطر 281:
                     else
                     else
                         talkText = string.format(
                         talkText = string.format(
                             '%s the [[%s#%s|talk page]].',
                             '%s the [[%s' .. (talk == '#' and '' or '#') .. '%s|talk page]].',
                             talkText,
                             talkText,
                             talkTitle.prefixedText,
                             talkTitle.prefixedText,
سطر 329: سطر 334:
and (cfg.imageSmallSize or '30x30px')
and (cfg.imageSmallSize or '30x30px')
or '40x40px'
or '40x40px'
self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage
self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage
or 'Imbox notice.png', imageSize)
or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" )
end
end
end
end
سطر 518: سطر 523:
imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div')
imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div')
end
end
imageLeftCell:wikitext(self.imageLeft or nil)
imageLeftCell
:addClass(self.imageLeftClass)
:wikitext(self.imageLeft or nil)
elseif self.imageEmptyCell then
elseif self.imageEmptyCell then
-- Some message boxes define an empty cell if no image is specified, and
-- Some message boxes define an empty cell if no image is specified, and
سطر 573: سطر 580:
end
end
imageRightCell
imageRightCell
:addClass(self.imageRightClass)
:wikitext(self.imageRight or nil)
:wikitext(self.imageRight or nil)
end
end