Content deleted Content added
start support for legs pass through to sports results (not complete) |
add support for legs |
||
Line 430:
-- Insert match row if needed
if match_table then
local legs = tonumber(Args['legs']) or 1
-- Add empty cell
table.insert(t,'| style="background-color:white;border-top:white;border-bottom:white;"| \n')
Line 439 ⟶ 440:
-- Nothing
else
for l=1,legs do
local match_note = Args['match_'..team_code_ii..'_'..team_code_jj..'_note']▼
local m = (legs == 1) and 'match_' or 'match' .. l .. '_'
notes_exist = true▼
▲ notes_exist = true
-- Only when it exist
if not (Args['note_'..match_note] or Args['match_'..match_note..'_note']) then▼
--
note_id = '"table_note_'..team_code_ii..'_'..team_code_jj..rand_val..'"' -- Add random end for unique ID if more tables are present on article (which might otherwise share an ID)▼
-- It's the entry
▲ note_id = '"table_note_'..team_code_ii..'_'..team_code_jj..rand_val..'"' -- Add random end for unique ID if more tables are present on article (which might otherwise share an ID)
note_id_list[team_code_ii..'_'..team_code_jj] = note_id
note_string = frame:expandTemplate{ title = 'efn', args = { group='lower-alpha', name=note_id, match_note} } else
-- Check for existence elsewhere
note_local_num = team_list[match_note] or ii_end + 1
if note_id_list[match_note] or ((note_local_num >= ii_start) and (note_local_num <= ii_end)) then
-- It exists
note_id = '"table_note_'..match_note..rand_val..'"' -- Identifier
note_string = frame:extensionTag{ name = 'ref', args = { group = 'lower-alpha', name = note_id} }
else
-- Now define the identifier for this
note_id = '"table_note_'..match_note..rand_val..'"' -- Add random end for unique ID
note_id_list[match_note] = note_id
-- Call refn template
note_string = frame:expandTemplate{ title = 'efn', args = { group='lower-alpha', name=note_id, Args['note_'..match_note]} }
end▼
end
▲ end
-- Now append this to the match result string
Args[
end
end
|