Module:Message box: Difference between revisions

Jump to navigation Jump to search
per tper
(Created page with "-- This is a meta-module for producing message box templates, including -- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}. -- Load necessary mo...")
 
(per tper)
Line 268: Line 268:
end
end
if talkTitle and talkTitle.exists then
if talkTitle and talkTitle.exists then
local talkText = 'Relevant discussion may be found on'
                local talkText
if talkArgIsTalkPage then
                if self.isSmall then
talkText = string.format(
                    local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk)
'%s [[%s|%s]].',
                    talkText = string.format('([[%s|talk]])', talkLink)
talkText,
                else
talk,
                    talkText = 'Relevant discussion may be found on'
talkTitle.prefixedText
                    if talkArgIsTalkPage then
)
                        talkText = string.format(
else
                            '%s [[%s|%s]].',
talkText = string.format(
                            talkText,
'%s the [[%s#%s|talk page]].',
                            talk,
talkText,
                            talkTitle.prefixedText
talkTitle.prefixedText,
                        )
talk
                    else
)
                        talkText = string.format(
end
                            '%s the [[%s#%s|talk page]].',
                            talkText,
                            talkTitle.prefixedText,
                            talk
                        )
                    end
                end
self.talk = talkText
self.talk = talkText
end
end
Line 297: Line 303:
end
end
if date then
if date then
self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date)
self.date = string.format(" <span class='date-container'>''(<span class='date'>%s</span>)''</span>", date)
end
end
self.info = args.info
self.info = args.info
Line 320: Line 326:
self.imageEmptyCell = cfg.imageEmptyCell
self.imageEmptyCell = cfg.imageEmptyCell
if cfg.imageEmptyCellStyle then
if cfg.imageEmptyCellStyle then
self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px'
self.imageEmptyCellStyle = 'border:none;padding:0;width:1px'
end
end


Line 524: Line 530:
:addClass('mbox-text-span')
:addClass('mbox-text-span')
:wikitext(self.issue or nil)
:wikitext(self.issue or nil)
if (self.talk or self.fix) and not self.isSmall then
if (self.talk or self.fix) then
textCellDiv:tag('span')
textCellDiv:tag('span')
:addClass('hide-when-compact')
:addClass('hide-when-compact')
Line 538: Line 544:
end
end
if self.removalNotice then
if self.removalNotice then
textCellDiv:tag('small')
textCellDiv:tag('span')
:addClass('hide-when-compact')
:addClass('hide-when-compact')
:tag('i')
:tag('i')
Anonymous user

Navigation menu