ep
 
Lhscogs​(留言 | 贡献)
小 导入1个版本
 
(未显示4个用户的12个中间版本)
第9行: 第9行:
local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]'
local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]'
local has_rows = false
local has_rows = false
local yesno = require("Module:Yesno")
local lists = {
local lists = {
plainlist_t = {
plainlist_t = {
第46行: 第47行:
end
end
end
end
end
local function isUntitledChildBox(sval)
return sval and ( sval:match( '^%s*<%s*[Tt][Rr]' ) or sval:match( '^%s*\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127%s*<%s*[Tt][Rr]' ) )
end
end


第158行: 第163行:
:tag('tr')
:tag('tr')
:addClass(rowArgs.rowclass)
:addClass(rowArgs.rowclass)
:addClass( isUntitledChildBox( rowArgs.header ) and 'infobox-hiddenrow' or nil )
:cssText(rowArgs.rowstyle)
:cssText(rowArgs.rowstyle)
:tag('th')
:tag('th')
第169行: 第175行:
:cssText(rowArgs.rowcellstyle)
:cssText(rowArgs.rowcellstyle)
:wikitext(fixChildBoxes(rowArgs.header, 'th'))
:wikitext(fixChildBoxes(rowArgs.header, 'th'))
if rowArgs.data then
if rowArgs.data and not yesno(args.decat) then
root:wikitext(
root:wikitext(
'[[Category:使用已忽略数据行信息框模板的条目]]'
'[[Category:使用已忽略数据行信息框模板的条目]]'
第192行: 第198行:
:wikitext(rowArgs.label)
:wikitext(rowArgs.label)
:done()
:done()
else
row:addClass( isUntitledChildBox( rowArgs.data ) and 'infobox-hiddenrow' or nil )
end
end


第233行: 第241行:
root
root
:tag('tr')
:tag('tr')
:addClass( isUntitledChildBox( args.above ) and 'infobox-hiddenrow' or nil )
:tag('th')
:tag('th')
:attr('colspan', '2')
:attr('colspan', '2')
第250行: 第259行:
root
root
:tag('tr')
:tag('tr')
:addClass( isUntitledChildBox( args.below ) and 'infobox-hiddenrow' or nil )
:tag('td')
:tag('td')
:attr('colspan', '2')
:attr('colspan', '2')
第267行: 第277行:
local row = root:tag('tr')
local row = root:tag('tr')
row:addClass(subheaderArgs.rowclass)
row:addClass(subheaderArgs.rowclass)
row:addClass( isUntitledChildBox( subheaderArgs.data ) and 'infobox-hiddenrow' or nil )


local dataCell = row:tag('td')
local dataCell = row:tag('td')
第311行: 第322行:
local row = root:tag('tr')
local row = root:tag('tr')
row:addClass(imageArgs.rowclass)
row:addClass(imageArgs.rowclass)
row:addClass( isUntitledChildBox( imageArgs.data ) and 'infobox-hiddenrow' or nil )


local dataCell = row:tag('td')
local dataCell = row:tag('td')
第458行: 第470行:
-- Render tracking categories. args.decat == turns off tracking categories.
-- Render tracking categories. args.decat == turns off tracking categories.
local function renderTrackingCategories()
local function renderTrackingCategories()
if args.decat == 'yes' then return end
if yesno(args.decat) then return end
if args.child == 'yes' then
if args.child == 'yes' then
if args.title then
if args.title then