Content deleted Content added
Add fixture list functionality |
Allow option to add notes to match results |
||
Line 337:
-- Add empty cell
table.insert(t,'| style="background-color:white;border-top:white;border-bottom:white;"| \n')
-- Now include note to match results if needed
for jj=1,N_teams do
team_code_jj = team_list[jj]
if ii == jj then
-- Nothing
else
local match_note = Args['match_'..team_code_ii..'_'..team_code_jj..'_note']
if match_note then
notes_exist = true
-- Only when it exist
-- First check for existence of reference for note
if not Args['note_'..match_note] then
-- It's the entry
note_string = frame:expandTemplate{ title = 'efn', args = { group='Table_notes', match_note} }
else
-- Check for existence elsewhere
note_local_num = team_list[match_note]
if note_id_list[match_note] or ((note_local_num >= ii_start) and (note_local_num <= ii_end)) then
-- It exists
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='Table_notes', name=note_id, Args['note_'..match_note]} }
end
end
-- Now append this to the match result string
Args['match_'..team_code_ii..'_'..team_code_jj] = Args['match_'..team_code_ii..'_'..team_code_jj]..note_string
end
end
end
-- Add rest of match row
|