Module:Equipment/Recommended: Difference between revisions

m
better colspan
m (typo)
m (better colspan)
Line 55: Line 55:
if #data < greatest_row_size then
if #data < greatest_row_size then
local difference = greatest_row_size - #data
local difference = greatest_row_size - #data
for i = 1, difference, 1 do
tr:tag('td'):attr('colspan', difference)
tr:tag('td'):addClass('table-na'):wikitext('')
end
end
end
return tr
return tr
Line 103: Line 101:
if #row_data > 0 or args.showall then
if #row_data > 0 or args.showall then
parent:node(make_row(v, row_data, compact))
parent:node(make_row(v, row_data, compact))
end
if #row_data < greatest_row_size then
local emptycol = mw.html.create('td'):attr('colspan', greatest_row_size-#row_data)
parent:node(emptycol)
end
end
end
end
892

edits