Module:Infobox interval region: Difference between revisions

m Cleanup and style
Ganaram inukshuk (talk | contribs)
update unseen infobox to header-data format
Tag: Reverted
Line 42: Line 42:
table.insert(data, {
table.insert(data, {
"Name",
["Header"] = "Name",
name
["Data"] = name
})
})
if centslower == nil or centslower == "" then
if centslower == nil or centslower == "" then
table.insert(data, {
table.insert(data, {
"Lower bound",
["Header"] = "Lower bound",
centslowerStrict .. "¢"
["Data"] = centslowerStrict .. "¢"
})
})
else
else
table.insert(data, {
table.insert(data, {
"Lower bound",
["Header"] = "Lower bound",
centslower .. "¢ – " .. centslowerStrict .. "¢"
["Data"] = centslower .. "¢ – " .. centslowerStrict .. "¢"
})
})
end
end
Line 60: Line 60:
if centsupper == nil or centsupper == "" then
if centsupper == nil or centsupper == "" then
table.insert(data, {
table.insert(data, {
"Upper bound",
["Header"] = "Upper bound",
centsupperStrict .. "¢"
["Data"] = centsupperStrict .. "¢"
})
})
else
else
table.insert(data, {
table.insert(data, {
"Upper bound",
["Header"] = "Upper bound",
centsupperStrict .. "¢ – " .. centsupper .. "¢"
["Data"] = centsupperStrict .. "¢ – " .. centsupper .. "¢"
})
})
end
end
if moses ~= nil and moses ~= "" then
if moses ~= nil and moses ~= "" then
table.insert(data, {
table.insert(data, {
"Generated [[MOS]]es",
["Header"] = "Generated [[MOS]]es",
moses
["Data"] = moses
})
})
end
end
table.insert(data, {
table.insert(data, {
string.format("<div style=\"margin-top: 0.6em;\"><b>%s</b></div>", "Example [[JI]] intervals")
["Header"] = string.format("<div style=\"margin-top: 0.6em;\"><b>%s</b></div>", "Example [[JI]] intervals")
})
})
local jidata = ""
local jidata = ""
Line 88: Line 88:
end
end
table.insert(data, {
table.insert(data, {
"Intervals",
["Header"] = "Intervals",
jidata
["Data"] = jidata
})
})
table.insert(data, {
table.insert(data, {
Line 96: Line 96:
if complement ~= nil and complement ~= "" then
if complement ~= nil and complement ~= "" then
table.insert(data, {
table.insert(data, {
"[[Complement]]",
["Header"] = "[[Complement]]",
complement
["Data"] = complement
})
})
end
end
if subregions ~= nil and subregions ~= "" then
if subregions ~= nil and subregions ~= "" then
table.insert(data, {
table.insert(data, {
"Subregions",
["Header"] = "Subregions",
subregions
["Data"] = subregions
})
})
end
end
if superregions ~= nil and superregions ~= "" then
if superregions ~= nil and superregions ~= "" then
table.insert(data, {
table.insert(data, {
"Superregion(s)",
["Header"] = "Superregion(s)",
superregions
["Data"] = superregions
})
})
end
end