606
edits
m |
m |
||
| Line 59: | Line 59: | ||
dataRow:addClass('infobox-data-section') | dataRow:addClass('infobox-data-section') | ||
if label | if label then | ||
dataRow:tag('span') | dataRow:tag('span') | ||
:addClass('infobox-label') | :addClass('infobox-label') | ||
| Line 80: | Line 80: | ||
for i, item in ipairs(data) do | for i, item in ipairs(data) do | ||
local label = (header == 'Construction Requirements') and nil or item.label | local label = (header == 'Construction Requirements') and nil or item.label | ||
local dataDiv = createDataRow(label, | local dataDiv = createDataRow(label, item.value, item.label) -- Pass icon as defaultValue if no label | ||
if dataDiv then | if dataDiv then | ||
row:tag('div'):addClass('infobox-data-item'):node(dataDiv):done() | row:tag('div'):addClass('infobox-data-item'):node(dataDiv):done() | ||
| Line 94: | Line 94: | ||
for _, item in ipairs(data) do | for _, item in ipairs(data) do | ||
local label = (header == 'Construction Requirements') and nil or item.label | local label = (header == 'Construction Requirements') and nil or item.label | ||
local dataRow = createDataRow(label, | local dataRow = createDataRow(label, item.value, item.label) -- Pass icon as defaultValue if no label | ||
if dataRow then | if dataRow then | ||
box:node(dataRow) | box:node(dataRow) | ||
edits