Module:Sports table: Difference between revisions

Content deleted Content added
From sandbox, no sorting in boundary column
Allow for prefixing of status letters
Line 275:
end
end
-- Only add brackets/dash and bolding if it exist
if not status_let_first then status_string = ' <span style="font-weight:bold">('..status_string..')</span>' end
if t_status.position == 'before' then
status_string = status_string..'<span style="font-weight:bold">('..curr_letterstring.lower(status_string)..') &ndash;</span> '..t_status.code[curr_letter]..'; '
else
status_string = ' <span style="font-weight:bold">('..status_string..')</span>'
end
end
end
Line 285 ⟶ 291:
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..group_txt..'\n') -- Group number/name
end
-- Build the team string order based on status position
table.insert(t,'| style="text-align: left; white-space:nowrap;'..ii_fw..bg_col..'"| '..team_name..note_string..status_string..'\n')-- Team (with possible note)
local team_string
if t_status.position == 'before' then
team_string = status_string..team_name..note_string
else
team_string = team_name..note_string..status_string
end
table.insert(t,'| style="text-align: left; white-space:nowrap;'..ii_fw..bg_col..'"| '..team_name..note_string..status_stringteam_string..'\n')-- Team (with possible note)
-- Call to subfunction
t_return = p_style.row(frame,t,Args,p_sub,notes_exist,hth_id_list,full_table,rand_val,team_list,team_code_ii,ii_start,ii_end,ii_fw,bg_col,N_teams,ii,ii_show)
Line 451 ⟶ 464:
curr_letter = mw.ustring.upper(mw.ustring.sub(t_status.letters,jjj,jjj))
if t_status.called[curr_letter] then
if t_status.position == 'before' then
status_string = status_string..'<span style="font-weight:bold">('..curr_letter..')</span> '..t_status.code[curr_letter]..'; '
status_string = status_string..'<span style="font-weight:bold">'..string.lower(curr_letter)..' &ndash;</span> '..t_status.code[curr_letter]..'; '
else
status_string = status_string..'<span style="font-weight:bold">('..curr_letter..')</span> '..t_status.code[curr_letter]..'; '
end
status_exist = true
end