Module:Message box: Difference between revisions
Jump to navigation
Jump to search
no edit summary
imported>Hb1290 No edit summary |
imported>Hb1290 No edit summary |
||
| 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' | |||
if talkArgIsTalkPage then | |||
talkText = string.format( | |||
'%s [[%s|%s]].', | |||
talkText, | |||
talk, | |||
talkTitle.prefixedText | |||
) | |||
else | |||
talkText = string.format( | |||
'%s the [[%s#%s|talk page]].', | |||
talkText, | |||
talkTitle.prefixedText, | |||
talk | |||
) | |||
end | |||
self.talk = talkText | self.talk = talkText | ||
end | end | ||
| Line 510: | Line 504: | ||
end | end | ||
imageLeftCell:wikitext(self.imageLeft or nil) | imageLeftCell:wikitext(self.imageLeft or nil) | ||
elseif self.imageEmptyCell then | |||
-- Some message boxes define an empty cell if no image is specified, and | |||
-- some don't. The old template code in templates where empty cells are | |||
-- specified gives the following hint: "No image. Cell with some width | |||
-- or padding necessary for text cell to have 100% width." | |||
row:tag('td') | |||
:addClass('mbox-empty-cell') | |||
:cssText(self.imageEmptyCellStyle or nil) | |||
end | |||
-- Add the text. | -- Add the text. | ||
| Line 521: | Line 524: | ||
:addClass('mbox-text-span') | :addClass('mbox-text-span') | ||
:wikitext(self.issue or nil) | :wikitext(self.issue or nil) | ||
if (self.talk or self.fix) then | if (self.talk or self.fix) and not self.isSmall then | ||
textCellDiv:tag('span') | textCellDiv:tag('span') | ||
:addClass('hide-when-compact') | :addClass('hide-when-compact') | ||
| Line 592: | Line 595: | ||
function p._exportClasses() | function p._exportClasses() | ||
-- For testing. | |||
return { | |||
MessageBox = MessageBox | |||
} | |||
end | end | ||
| Line 611: | Line 618: | ||
return setmetatable(p, mt) | return setmetatable(p, mt) | ||