Module:Sports table/WDL OT: Difference between revisions

Content deleted Content added
fix
optional override of showing the OT win and OT loss columns
Line 41:
-- True if exist, false otherwise
if yesno(use_ratio_val) then do_ratio = true end
-- Whether to show the OT win and OT loss columns
local show_OTwin = yesno(Args['showOTwin'] or 'yes')
local show_OTloss = yessno(Args['showOTloss'] or 'yes')
-- Initialize
Line 56 ⟶ 60:
if full_table then
tt = p_sub.colhead(tt,32,'<abbr title="Won">W</abbr>') -- Win col
if show_OTwin then tt = p_sub.colhead(tt,32,OTwin_head_text) end
tt = p_sub.colhead(tt,32,'<abbr title="Drawn">D</abbr>') -- Draw col
ttif show_OTloss then t = p_sub.colhead(tt,32,OTloss_head_text) end
tt = p_sub.colhead(tt,32,'<abbr title="Lost">L</abbr>') -- Loss col
tt = p_sub.colhead(tt,32,'<abbr title="'..fa_word_plur..' for">'..fa_letter..'F</abbr>') -- For col
Line 127 ⟶ 131:
end
end
-- Whether to show the OT win and OT loss columns
local show_OTwin = yesno(Args['showOTwin'] or 'yes')
local show_OTloss = yessno(Args['showOTloss'] or 'yes')
-- Some local vars
Line 139 ⟶ 147:
if full_table then
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..wins..'\n') -- Won
if show_OTwin then
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..OTwins..'\n') -- Won in OT
end
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..draws..'\n') -- Drawn
if show_OTloss then
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..OTlosses..'\n') -- Lost in OT
end
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..losses..'\n') -- Lost
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gfor..'\n') -- GF