Module:CRTModel: Difference between revisions
No edit summary |
No edit summary |
||
| Line 76: | Line 76: | ||
local weight = trim(args.weight) | local weight = trim(args.weight) | ||
local standards_semantic = trim(args.standards_semantic) | local standards_semantic = trim(args.standards_semantic) | ||
local crtdatabase = trim(args.crtdatabase) | |||
local consolemods = trim(args.consolemods) | |||
local tbl = mw.html.create('table') | local tbl = mw.html.create('table') | ||
| Line 178: | Line 180: | ||
addSectionRow(tbl, 'Standards') | addSectionRow(tbl, 'Standards') | ||
addFullRow(tbl, standards_semantic, 'padding:0.2em 0.4em;', false) | addFullRow(tbl, standards_semantic, 'padding:0.2em 0.4em;', false) | ||
end | |||
-- Other Databases section: only display if there are links | |||
if crtdatabase or consolemods then | |||
addSectionRow(tbl, 'Other Databases') | |||
local links = {} | |||
if crtdatabase then | |||
table.insert(links, '[' .. crtdatabase .. ' CRT Database]') | |||
end | |||
if consolemods then | |||
table.insert(links, '[' .. consolemods .. ' Console Mods Wiki]') | |||
end | |||
local linksWikitext = table.concat(links, '<br>') | |||
addFullRow(tbl, linksWikitext, 'padding:0.2em 0.4em;', false) | |||
end | end | ||