Content deleted Content added
No edit summary |
No edit summary |
||
Line 128:
tt = p_sub.colhead(tt,28,'<abbr title="'..tpre..fa_word_plur..' for">'..apre..fa_letter..'F</abbr>') -- For col
tt = p_sub.colhead(tt,28,'<abbr title="'..tpre..fa_word_plur..' against">'..apre..fa_letter..'A</abbr>') -- Against col
if tpre=="" then
else
tt = p_sub.colhead(tt,36,'<abbr title="'..tpre..'win percentage">'..apre..'W</abbr>')
end
end
end
Line 152 ⟶ 159:
if show_GB then -- Games behind header
tt = p_sub.colhead(tt,28,'<abbr title="Games behind">GB</abbr>')
▲ end
▲ if show_perc then
▲ tt = p_sub.colhead(tt,36,'<abbr title="Win percentage">PCT</abbr>') -- Win percentage col
end
if show_bonus_points then
Line 235 ⟶ 239:
local win_perc = ''
local cwin_perc = ''
if tonumber(matches) == nil or matches == 0 then
-- Escape for zero matches
Line 246 ⟶ 251:
end
end
if tonumber(cwins+closses) == nil or (cwins+closses+cdraws) == 0 then
-- Escape for zero matches
cwin_perc = '—'
else
--Some sports use draw as well
cwin_perc = mm._precision_format((2*cwins + cdraws) / (2*(cwins+cdraws+closses)), 3)
if closses > 0 then
-- Drop the leading zero (from the string)
cwin_perc = string.sub(cwin_perc,2,string.len(cwin_perc))
end
end
-- Show for/against
local for_against_style = Args['for_against_style'] or 'goals'
|