Difference between revisions of "Module:Bundles"

Jump to navigation Jump to search
178 bytes added ,  14:15, 1 December 2021
m
18 revisions imported: Importing from localhost
m (18 revisions imported: Importing from localhost)
 
(13 intermediate revisions by the same user not shown)
Line 6: Line 6:
currentRow = mw.text.split(currentRow, ';')
currentRow = mw.text.split(currentRow, ';')
objects = table.getn(currentRow)
objects = table.getn(currentRow)
result = mw.html.create('div')
rowGroup = ''
result:addClass('bundle-row bundle-col-' .. objects)
for k, v in ipairs(currentRow) do
for k, v in ipairs(currentRow) do
vs = mw.text.split(v, '-')
vs = mw.text.split(v, '-')
result:tag('span')
object = mw.html.create('span')
:wikitext(icon.icon(vs[1], vs[2], nil, 'no'))
:wikitext(icon.icon(vs[1], vs[2], nil, 'no'))
:done()
rowGroup = rowGroup .. tostring(object)
if k ~= objects then
if k ~= objects then
result:tag('span')
object = mw.html.create('span')
:addClass('bundle-joiner')
:addClass('bundle-joiner')
:wikitext('+')
:wikitext(' + ')
rowGroup = rowGroup .. tostring(object)
end
end
end
end
result = mw.html.create('div')
result:addClass('bundle-row bundle-col-' .. objects)
result:wikitext(rowGroup)
mw.log(result)
return result
return result
end
end

Navigation menu