Module:RoundN: Difference between revisions

Content deleted Content added
No edit summary
removing tracking and unused parameters per talk page
Line 348:
for _, v in ipairs({--more args to boolean
'widescore',
'template',
'article_include',
'color',
'color_repechage',
Line 454 ⟶ 452:
setmetatable(scoreWidth, _scoreWidth)
end
 
if p.template or p.article_include then
p.template = mw.title.new(args.name)
p.templateFixedName = (p.template.namespace == 0 and not p.article_include and 'Template:' or '') .. p.template.fullText
end
p.template = p.template and mw.title.new(args:clean('name', {pattern = ''}))
local head_br = {
count = 0,
Line 486 ⟶ 480:
or p.RD[#p.RD + k - p.tCols - 1]
or ('Round of ' .. math.pow(2, p.tCols - k + 1))
drawHead(head.wt)
k == 1 and p.template and mw.getCurrentFrame():expandTemplate{
title = 'navbar-header',
args = {head.wt, p.templateFixedName}
} or head.wt
)
end
end
Line 527 ⟶ 516:
rowNum[1]:node(c < p.cols and
mw.clone(bumpBase):attr{rowspan = bump}
or p.no_column_head and p.template and
mw.html.create'td':wikitext(mw.getCurrentFrame():expandTemplate{
title = 'navbar-header',
args = {'', p.templateFixedName}
})
)
end
Line 839 ⟶ 823:
local args = require'Module:Arguments'.getArgs(frame, {trim = false})
args.columns = args.columns or columns
return tostring(p._main(args)) .. tracking
local tracking = (args['template'] and '[[Category:Pages using RoundN with template]]' or '') ..
(args['article_include'] and '[[Category:Pages using RoundN with article include]]' or '')
return tostring(p._main(args)) .. tracking
end