Module:Election results/sandbox: Difference between revisions

Content deleted Content added
+
+
Line 108:
:wikitext(string.format('\[\[%s\]\]', args['party' .. v]))
end
local cell = mw.html.create('td')
cell
:css('text-align', 'right')
if args['votes' .. v] then
cell
:wikitext(fmt(args['votes' .. v]))
end
row:node(cell)
local cell = mw.html.create('td')
cell
:css('text-align', 'right')
if args['votes' .. v] then
cell
:wikitext(string.format('%.2f%%', args['votes' .. v] / valid * 100))
end
row:node(cell)
 
elseif cand then
row
Line 121 ⟶ 138:
:wikitext(string.format('\[\[%s\]\]', args['party' .. v]))
end
local cell = mw.html.create('td')
cell
:css('text-align', 'right')
if args['votes' .. v] then
cell
:wikitext(fmt(args['votes' .. v]))
end
row:node(cell)
local cell = mw.html.create('td')
cell
:css('text-align', 'right')
if args['votes' .. v] then
cell
:wikitext(string.format('%.2f%%', args['votes' .. v] / valid * 100))
end
row:node(cell)
else
if args['party_name' .. v] then
Line 130 ⟶ 163:
:tag('td')
:wikitext(string.format('\[\[%s\]\]', args['party' .. v]))
end
end
local cell = mw.html.create('td')
Line 148 ⟶ 180:
end
row:node(cell)
end
root:node(row)
end