1,124
edits
m (18 revisions imported: Importing from localhost) |
|||
| (6 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) | ||
rowGroup = '' | |||
for k, v in ipairs(currentRow) do | for k, v in ipairs(currentRow) do | ||
vs = mw.text.split(v, '-') | vs = mw.text.split(v, '-') | ||
| Line 14: | Line 12: | ||
object = mw.html.create('span') | object = mw.html.create('span') | ||
:wikitext(icon.icon(vs[1], vs[2], nil, 'no')) | :wikitext(icon.icon(vs[1], vs[2], nil, 'no')) | ||
rowGroup = rowGroup .. tostring(object) | |||
if k ~= objects then | if k ~= objects then | ||
object = mw.html.create('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 | ||