Module:Election results/sandbox: Difference between revisions

Content deleted Content added
optional two rounds (probably broken)
No edit summary
Line 206:
end
for kk, suf in ipairs(rsuff) do
if(args['votes' .. v .. suffsuf]) then
row:tag('td')
:css('text-align', 'right')
:wikitext(fmt(args['votes' .. v .. suffsuf]))
row:tag('td')
:css('text-align', 'right')
:wikitext(string.format('%.2f%%', args['votes' .. v .. suffsuf] / valid * 100))
else
row:tag('td'):attr('colspan', 2)
Line 227:
string.format('\[\[%s\]\]', args['party' .. v]) or nil)
for kk, suf in ipairs(rsuff) do
if(args['votes' .. v .. suffsuf]) then
row:tag('td')
:css('text-align', 'right')
:wikitext(fmt(args['votes' .. v .. suffsuf]))
row:tag('td')
:css('text-align', 'right')
:wikitext(string.format('%.2f%%', args['votes' .. v .. suffsuf] / valid * 100))
else
row:tag('td'):attr('colspan', 2)
Line 245:
string.format('\[\[%s\]\]', args['party' .. v]) or nil)
for kk, suf in ipairs(rsuff) do
if(args['votes' .. v .. suffsuf]) then
row:tag('td')
:css('text-align', 'right')
:wikitext(fmt(args['votes' .. v .. suffsuf]))
row:tag('td')
:css('text-align', 'right')
:wikitext(string.format('%.2f%%', args['votes' .. v .. suffsuf] / valid * 100))
else
row:tag('td'):attr('colspan', 2)