Module:Election results/sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 24:
end
if args['votes' .. i] then
local vvotesi = tonumber(args['votes' .. i]) or 0
args['votes' .. i] = vvotesi
if vvotesi > winner_votes[1] then
winner[1] = i
winner_votes[1] = vvotesi
end
valid[1] = valid[1] + vvotesi
end
if args['votes' .. i .. '_2'] then
rounds = 2
local vvotesi = tonumber(args['votes' .. i .. '_2']) or 0
args['votes' .. i .. '_2'] = vvotesi
if vvotesi > winner_votes[2] then
winner[2] = i
winner_votes[2] = vvotesi
end
valid[2] = valid[2] + vvotesi
end
end
Line 261:
:css('text-align', 'right')
:wikitext(fmt(args['seats' .. v]))
local cell = mw.html.create :tag('td')
cell
:css('text-align', 'right')
if args['sc' .. v] then
cell
:wikitext(args['sc' .. v])
end
row:node(cell)
end
end