1,870
回編集
ja>ネイ  (en:Module:Message box oldid=1117705817 より更新)  | 
細 (1版 をインポートしました)  | 
||
| (2人の利用者による、間の3版が非表示) | |||
| 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.  | ||
| 261行目: | 262行目: | ||
	end  | 	end  | ||
	if talkTitle and talkTitle.exists then  | 	if talkTitle and talkTitle.exists then  | ||
                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)  | ||
| 269行目: | 270行目: | ||
                     if talkArgIsTalkPage then  |                      if talkArgIsTalkPage then  | ||
                         talkText = string.format(  |                          talkText = string.format(  | ||
                             '%s[[%s|%s]]に存在するかもしれません。',  |                              '%s [[%s|%s]]に存在するかもしれません。',  | ||
                             talkText,  |                              talkText,  | ||
                             talk,  |                              talk,  | ||
| 296行目: | 297行目: | ||
	end  | 	end  | ||
	if date then  | 	if date then  | ||
	self.date = string.format("<span class='date-container'>  | 	self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date)  | ||
	end  | 	end  | ||
	self.info = args.info  | 	self.info = args.info  | ||
| 329行目: | 330行目: | ||
	and (cfg.imageSmallSize or '30x30px')  | 	and (cfg.imageSmallSize or '30x30px')  | ||
	or '40x40px'  | 	or '40x40px'  | ||
	self.imageLeft = string.format('[[File:%s|%s  | 	self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage  | ||
	or '  | 	or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" )  | ||
	end  | 	end  | ||
	end  | 	end  | ||
| 339行目: | 340行目: | ||
	self.imageRight = imageRight  | 	self.imageRight = imageRight  | ||
	end  | 	end  | ||
	-- set templatestyles  | 	-- set templatestyles  | ||
	self.base_templatestyles = cfg.templatestyles  | 	self.base_templatestyles = cfg.templatestyles  | ||
| 541行目: | 542行目: | ||
	textCellDiv:tag('span')  | 	textCellDiv:tag('span')  | ||
	:addClass('hide-when-compact')  | 	:addClass('hide-when-compact')  | ||
	:wikitext(self.talk and (self.talk) or nil)  | 	:wikitext(self.talk and (' ' .. self.talk) or nil)  | ||
	:wikitext(self.fix and (self.fix) or nil)  | 	:wikitext(self.fix and (' ' .. self.fix) or nil)  | ||
	end  | 	end  | ||
	textCellDiv:wikitext(self.date or nil)  | 	textCellDiv:wikitext(self.date and (' ' .. self.date) or nil)  | ||
	if self.info and not self.isSmall then  | 	if self.info and not self.isSmall then  | ||
	textCellDiv  | 	textCellDiv  | ||