יחידה:Election results – הבדלי גרסאות

תוכן שנמחק תוכן שנוסף
Copy fix from sandbox
Add swing parameter
שורה 50:
for kk = 1, 20 do
i = i + 1
for k, key in ipairs({'cand', 'vp', 'party', 'sc', 'sw', 'seats'}) do
if args[key .. i] then
headings[key] = true
שורה 120:
args['color' .. i] = 'inherit'
args['row' .. i] = 'Total'
args['sw' .. i] = '–'
args['seats' .. i] = seats
args['sc' .. i] = seatdiff
שורה 202 ⟵ 203:
:attr('scope', 'col')
cols = cols + 2
end
if headings['sw'] then
row
:tag('th')
:wikitext('+/–')
:attr('scope', 'col')
:attr('rowspan', rowspan)
cols = cols + 1
end
if headings['seats'] then
שורה 225 ⟵ 234:
local cs = cols - 2*rounds
- (headings['sw'] and 1 or 0)
- (headings['seats'] and 1 or 0)
- (headings['sc'] and 1 or 0)
שורה 281 ⟵ 291:
row:tag('td'):attr('colspan', 2)
end
end
if headings['sw'] then
row
:tag('td')
:css('text-align', 'right')
:wikitext(args['sw' .. v])
end
if headings['seats'] then
שורה 323 ⟵ 339:
:wikitext(pct(ovalid[k], ovalid[k] + invalid[k]))
end
if headings['sw'] or headings['seats'] or headings['sc'] then
local cspan = (headings['sw'] and 1 or 0) + (headings['seats'] and 1 or 0) + (headings['sc'] and 1 or 0)
row
:tag('td')
שורה 348 ⟵ 364:
:wikitext(pct(invalid[k], ovalid[k] + invalid[k]))
end
if headings['sw'] or headings['seats'] or headings['sc'] then
local cspan = (headings['sw'] and 1 or 0) + (headings['seats'] and 1 or 0) + (headings['sc'] and 1 or 0)
row
:tag('td')
שורה 373 ⟵ 389:
:wikitext(pct(1,1))
end
if headings['sw'] or headings['seats'] or headings['sc'] then
local cspan = (headings['sw'] and 1 or 0) + (headings['seats'] and 1 or 0) + (headings['sc'] and 1 or 0)
row
:tag('td')
שורה 397 ⟵ 413:
:wikitext(pct(ovalid[k] + invalid[k], electorate[k]))
end
if headings['sw'] or headings['seats'] or headings['sc'] then
local cspan = (headings['sw'] and 1 or 0) + (headings['seats'] and 1 or 0) + (headings['sc'] and 1 or 0)
row
:tag('td')