1,131
edits
No edit summary |
No edit summary |
||
| Line 49: | Line 49: | ||
:tag('th'):wikitext('Members?'):done() | :tag('th'):wikitext('Members?'):done() | ||
:done() | :done() | ||
local function addShopRow(shop, location) | |||
restbl:tag('tr') | |||
:tag('td'):wikitext(shop.seller):done() | |||
:tag('td'):wikitext(location):done() | |||
:tag('td') | |||
:attr({['data-sort-value']=shop.sellSortValue}) | |||
:wikitext(shop.sellvalue) | |||
:done() | |||
:tag('td') | |||
:attr({['data-sort-value']=shop.buySortValue}) | |||
:wikitext(shop.buyvalue) | |||
:done() | |||
:tag('td'):wikitext(shop.members):done() | |||
:done() | |||
end | |||
-- Create the rows for the output table | -- Create the rows for the output table | ||
| Line 55: | Line 71: | ||
for i, location in ipairs(shop.location) do | for i, location in ipairs(shop.location) do | ||
addShopRow(shop, location) | |||
end | |||
if #shop.location == 0 then | |||
addShopRow(shop, 'N/A') | |||
end | end | ||
end | end | ||