Module:Election results/sandbox: Difference between revisions

Content deleted Content added
+
+
Line 1,378:
end
-- total
if args['invalidblank'] or args['invalid'] or args['totalvotes'] or args['invalidblank2'] or args['invalid2'] or args['totalvotes2'] then
row = root:tag('tr')
:addClass('sortbottom')
Line 1,391:
:css('background', 'inherit')
:css('color', 'inherit')
if not args['totalvotes'] and args['invalid'] or not args['totalvotes'] and args['invalidblank'] then
row
:tag('td')
:wikitext(fmt(ovalid[1] + invalidblank[1] + invalid[1] + blank[1]))
:tag('td')
:wikitext(pct(1, 1))
Line 1,403:
:tag('td')
:wikitext('–')
else
elseif not args['invalid'] and not args['totalvotes'] then
row
:tag('td')
Line 1,428:
:wikitext()
end
if rounds > 1 and args['invalid2'] and not args['totalvotes2'] or rounds > 1 and args['invalidblank2'] and not args['totalvotes2'] then
row
:tag('td')
:wikitext(fmt(ovalid[2] + invalidblank[2] + invalid[2] + blank[2]))
:tag('td')
:wikitext(pct(1, 1))
Line 1,440:
:tag('td')
:wikitext('–')
else
elseif rounds > 1 and not args['invalid2'] or rounds > 1 and not args['totalvotes2'] then
row
:tag('td')
Line 1,468:
row
:tag('td')
:wikitext(fmt(ovalid[3] + invalidblank[3] + invalid[3] + blank[3]))
:tag('td')
:wikitext(pct(1, 1))
Line 1,520:
row
:tag('td')
:wikitext(args.turnout or pct(ovalid[1] + invalidblank[1] + invalid[1] + blank[1], electorate[1]))
elseif args['totalvotes'] and args['electorate'] then
row
Line 1,559:
row
:tag('td')
:wikitext(args.turnout2 or pct(ovalid[2] + invalidblank[2] + invalid[2] + blank[2], electorate[2]))
elseif args['totalvotes2'] and args['electorate2'] then
row
Line 1,599:
row
:tag('td')
:wikitext(args.turnout3 or pct(ovalid[3] + invalidblank[3] + invalid[3] + blank[3], electorate[3]))
elseif args['totalvotes3'] and args['electorate3'] then
row