Content deleted Content added
bolding and notes |
MusikBot II (talk | contribs) m Protected "Module:Sports table/Wrestling": High-risk template or module: 251 transclusions (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 23:
local show_win = yesno(Args['show_win'] or 'yes')
local show_loss = yesno(Args['show_loss'] or 'yes')
local show_tp = yesno(Args['show_tp'] or 'yes')
local show_round = yesno(Args['show_round'] or 'no')
Line 53 ⟶ 54:
end
tt = p_sub.colhead(tt,28,'<abbr title="Classification points">CP</abbr>') -- Classification points col
end
if full_table then
tt.count = tt.count+1
Line 92 ⟶ 95:
local show_win = yesno(Args['show_win'] or 'yes')
local show_loss = yesno(Args['show_loss'] or 'yes')
local show_tp = yesno(Args['show_tp'] or 'yes')
local show_round = yesno(Args['show_round'] or 'no')
local digits = Args['digitpad']
Line 98 ⟶ 102:
local wins = tonumber(Args['win_'..team_code_ii]) or 0
local losses = tonumber(Args['loss_'..team_code_ii]) or 0
local round =
local cp = tonumber(Args['cp_'..team_code_ii]) or 0
local tp = tonumber(Args['tp_'..team_code_ii]) or 0
Line 112 ⟶ 116:
-- What to rank the teams by
local ranking_style = string.lower(Args['ranking_style'] or (show_round and 'r' or 'cp'))
local win_fw, win_string, cp_fw, cp_string, round_fw, round_string = '', '', '', '', '', ''
▲ if show_round then
if (ranking_style == 'w' or ranking_style == 'win' or ranking_style == 'wins') then
local round_fw = 'font-weight: bold;'▼
local round_string = hth_string▼
elseif (ranking_style == 'r' or ranking_style == 'rnd' or ranking_style == 'round') then
elseif (ranking_style == 'cp') then
cp_fw = 'font-weight: bold;'
cp_string = hth_string
else
win_string = hth_string
▲ local cp_fw = 'font-weight: bold;'
▲ local cp_string = hth_string
end
Line 135 ⟶ 145:
end
if show_win then
table.insert(t,'| style="'..ii_fw..win_fw..bg_col..'" |'..num_align(wins,digits)..win_string..'\n') -- Won
end
if show_loss then
Line 150 ⟶ 160:
table.insert(t,'| style="'..ii_fw..cp_fw..bg_col..'" | '..num_align(cp,digits)..cp_string..'\n')
end
if
if tp<0 then
table.insert(t,'| style="'..ii_fw..bg_col..'" | −'..num_align(-tp,digits)..'\n')
table.insert(t,'| style="'..ii_fw..bg_col..'" | '..num_align(tp,digits)..'\n')
end
end
return {t=t, notes_exist=notes_exist, hth_id_list=hth_id_list}
|