Module:Sports table/WDL OT: Difference between revisions

Content deleted Content added
making score width optional
Tag: Reverted
Undid revision 1249257190 by Sports2021 (talk) didn't work well
Line 9:
-- Pre stuff
local team_width = Args['teamwidth'] or '190'
local score_width = Args['scorewidth'] or '32'
local sort_text = yesno(Args['sortable_table'] or 'no') and ' sortable' or ''
local show_played = not yesno(Args['hide_played'] or 'no')
Line 106 ⟶ 105:
-- Actual headers
if pos_label ~= nil then
tt = p_sub.colhead(tt,scorewidth28,pos_label) -- Position col
end
-- Add group header
Line 114 ⟶ 113:
tt = p_sub.colhead(tt,team_width,'Team'..VTE_text) -- Team col
if show_played then
tt = p_sub.colhead(tt,scorewidth32,played_head_text) -- Matches played col
end
if full_table then
tt = p_sub.colhead(tt,score_width32,win_head_text) -- Win col
if show_OTwin then tt = p_sub.colhead(tt,score_width32,OTwin_head_text) end
if show_PKwin then tt = p_sub.colhead(tt,score_width32,PKwin_head_text) end
if show_draw then
tt = p_sub.colhead(tt,score_width32,'<abbr title="Drawn">D</abbr>') -- Draw col
end
if show_OTloss and not OTloss_after then t = p_sub.colhead(tt,score_width32,OTloss_head_text) end
if show_PKloss and not PKloss_after then t = p_sub.colhead(tt,score_width32,PKloss_head_text) end
tt = p_sub.colhead(tt,score_width32,loss_head_text) -- Loss col
if show_OTloss and OTloss_after then t = p_sub.colhead(tt,score_width32,OTloss_head_text) end
if show_PKloss and PKloss_after then t = p_sub.colhead(tt,score_width32,PKloss_head_text) end
if show_tiebr then t = p_sub.colhead(tt,score_width32,tiebr_head_text) end
if not hide_for_against then
tt = p_sub.colhead(tt,score_width32,'<abbr title="'..fa_word_plur..' for">'..fa_letter..'F</abbr>') -- For col
tt = p_sub.colhead(tt,score_width32,'<abbr title="'..fa_word_plur..' against">'..fa_letter..'A</abbr>') -- Against col
if do_ratio or do_average then
local ratio_word = do_ratio and ' ratio' or ' average'
Line 139 ⟶ 138:
tt = p_sub.colhead(tt,28,'<abbr title="'..fa_word_sing..' percentage">%</abbr>') -- Percentage col
else
tt = p_sub.colhead(tt,score_width32,'<abbr title="'..fa_word_sing..' difference">'..fa_letter..'D</abbr>') -- Difference col
end
end
Line 147 ⟶ 146:
end
if show_points then
tt = p_sub.colhead(tt,score_width32,'<abbr title="Points">Pts</abbr>') -- Points col
end
if show_perc then