Content deleted Content added
Bromalayan (talk | contribs) No edit summary |
MusikBot II (talk | contribs) m Protected "Module:Sports table/Badminton team": High-risk template or module: 270 transclusions (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 36:
local for_against_style = Args['for_against_style'] or 'matches'
local fa_letter, fa_word_sing, fa_word_plur
local show_matches = yesno(Args['show_matches'] or 'yes')
local hide_for_against = false
-- First convert to lower case if it is a string
Line 142 ⟶ 143:
end
if not hide_for_against then
tt = p_sub.colhead(tt,20,'<abbr title="'..fa_word_plur..' for">'..fa_letter..'F</abbr>') -- For col▼
tt = p_sub.colhead(tt,20,'<abbr title="'..fa_word_plur..'
▲ tt = p_sub.colhead(tt,20,'<abbr title="'..fa_word_plur..'
▲ if do_ratio then
if do_ratio then
tt = p_sub.colhead(tt,20,'<abbr title="'..fa_word_sing..' ratio">'..fa_letter..'R</abbr>') -- Ratio col
elseif do_percentage then
tt = p_sub.colhead(tt,20,'<abbr title="'..fa_word_sing..' percentage">%</abbr>') -- Percentage col
else
tt = p_sub.colhead(tt,20,'<abbr title="'..fa_word_sing..' difference">'..fa_letter..'D</abbr>') -- Difference col
end
end
tt = p_sub.colhead(tt,20,'<abbr title="'..gfa_word_plur..' for">'..gfa_letter..'F</abbr>') -- For col
tt = p_sub.colhead(tt,20,'<abbr title="'..gfa_word_plur..' against">'..gfa_letter..'A</abbr>') -- Against col
Line 218 ⟶ 221:
local points = win_points*wins + loss_points*losses + s_pts
local win_perc = ''
--Some sports use draw as well▼
if matches == 0 then
-- Escape for zero matches
win_perc = '—'
else
elseif losses > 0 then▼
-- Drop the leading zero (from the string)▼
win_perc =
▲ -- Drop the leading zero (from the string)
win_perc = string.sub(win_perc,2,string.len(win_perc))
end
end
-- Show for/against
local for_against_style = Args['for_against_style'] or 'goals'
local show_matches = yesno(Args['show_matches'] or 'yes')
local hide_for_against = false
for_against_style = string.lower(for_against_style)
Line 366 ⟶ 373:
if not hide_for_against then
if show_matches then
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..mfor..'\n') -- MF▼
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..
end
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gaig..'\n') -- GA▼
if Args['game_for_against_style'] ~= 'none' then
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gcomp..'\n') -- Game comparison▼
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..
if Args['point_for_against_style'] ~= 'none' then -- game param hides games and points in header
end
end
end
|