Difference between revisions of "Module:OInfobox-Building"

Jump to navigation Jump to search
m
no edit summary
m
m
Line 59: Line 59:
         dataRow:addClass('infobox-data-section')
         dataRow:addClass('infobox-data-section')


         if label and header ~= 'Construction Requirements' then
         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, item.label .. (item.value and ' ' .. item.value or ''))
             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, item.label .. (item.value and ' ' .. item.value or ''))
             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)
606

edits

Navigation menu