Module:Sports table/WDL OT: Difference between revisions

Content deleted Content added
making score width optional
Tag: Reverted
fix
 
(5 intermediate revisions by 2 users not shown)
Line 50:
-- Based on ppg and points
show_ppg = true
show_points = true
elseif ranking_style=='forpts' then
-- Based on goals for and points
show_points = true
else
Line 106 ⟶ 109:
-- Actual headers
if pos_label ~= nil then
tt = p_sub.colhead(tt,scorewidthscore_width,pos_label) -- Position col
end
-- Add group header
Line 114 ⟶ 117:
tt = p_sub.colhead(tt,team_width,'Team'..VTE_text) -- Team col
if show_played then
tt = p_sub.colhead(tt,scorewidthscore_width,played_head_text) -- Matches played col
end
if full_table then
Line 324 ⟶ 327:
local rank_points, rank_perc, rank_ppg = false, false, false
local win_fw, win_string
local for_style, points_style = '', ''
ranking_style = string.lower(ranking_style)
if ranking_style=='w' or ranking_style=='win' or ranking_style=='wins' then
Line 343 ⟶ 347:
rank_perc = true
rank_points = true
points_style = 'font-weight:bold;'
win_fw=ii_fw
win_string = ''
Line 349 ⟶ 354:
rank_ppg = true
rank_points = true
points_style = 'font-weight:bold;'
win_fw=ii_fw
win_string = ''
elseif ranking_style=='none' then
win_fw=ii_fw
win_string = ''
elseif ranking_style=='forpts' then
-- Based on goals for and points
rank_points = true
points_style = 'font-weight:bold;'
for_style = 'font-weight:bold;'
win_fw=ii_fw
win_string = ''
Line 357 ⟶ 370:
-- Based on points
rank_points = true
points_style = 'font-weight:bold;'
win_fw=ii_fw
win_string = ''
Line 410 ⟶ 424:
end
if not hide_for_against then
table.insert(t,'| style="'..ii_fw..bg_col..for_style..'" |'..gfor..'\n') -- GF
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gaig..'\n') -- GA
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gcomp..'\n') -- Goal comparison
Line 426 ⟶ 440:
-- Add − for negative point totals
if points<0 then
table.insert(t,'| style="font-weight: bold;'..points_style..bg_col..'" | &minus;'..-points..hth_string..'\n')
else
table.insert(t,'| style="font-weight: bold;'..points_style..bg_col..'" | '..points..hth_string..'\n')
end
elseif rank_perc then