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

תוכן שנמחק תוכן שנוסף
Frietjes (שיחה | תרומות)
use nil
Allow electorate and turnout to be entered when they are the only things known
שורה 97:
end
end
end
-- optional against all
if args['against_all'] or args['against_all2'] then
max_rows = max_rows + 1
local i = max_rows
table.insert(index, i)
if tonumber(args['against_all']) then showtotal.votes = 1 end
if tonumber(args['against_all_2']) then showtotal.votes_2 = 1 end
args['votes' .. i] = tonumber(args['against_all']) or 0
args['votes' .. i .. '_2'] = tonumber(args['against_all_2']) or 0
args['colour' .. i] = 'inherit'
args['color' .. i] = 'inherit'
args['row' .. i] = 'Against all'
valid[1] = valid[1] + args['votes' .. i]
valid[2] = valid[2] + args['votes' .. i .. '_2']
tracking = tracking .. '[[Category:Pages using election results with against all]]'
end
 
שורה 189 ⟵ 172:
end
if rounds > 1 then
if args['firstround'] then
row
:tag('th')
:wikitext(args.firstround or 'First round')
:attr('scope', 'col')
:attr('colspan', 2)
:tag('th')
:wikitext(args.secondround or 'Second round')
:attr('scope', 'col')
:attr('colspan', 2)
secondrow = root:tag('tr')
else
row
:tag('th')
:wikitext('First round')
:attr('scope', 'col')
:attr('colspan', 2)
:tag('th')
:wikitext('Second round')
:attr('scope', 'col')
:attr('colspan', 2)
secondrow = root:tag('tr')
end
else
secondrow = row
שורה 508 ⟵ 478:
:css('font-weight', 'normal')
:css('background', 'inherit')
if args['electorate'] and args['turnout'] then
for k=1,rounds do
row:tag('thtd')
:wikitext('Second round'fmt(electorate[k]))
row:tag('thtd')
:wikitext('First round'fmt(turnout[k]))
end
if elseif args['firstroundturnout'] then
for k=1,rounds do
row:tag('td')