Halo Esports Wiki
Halo Esports Wiki
[checked revision][checked revision]
Donut (talk | contribs)
m (Syncing content across wikis)
Donut (talk | contribs)
Line 16: Line 16:
 
:done()
 
:done()
 
:tag('td')
 
:tag('td')
:wikitext(m_role.onlyimage(args['teamrole' .. i], { sub = util_args.castAsBool(args['issub' .. i]) }))
+
:wikitext(m_role.onlyimage(args['teamrole' .. i]))
 
:wikitext(' ')
 
:wikitext(' ')
 
:wikitext(m_team.rightmediumlinked(args['teamhist' .. i]))
 
:wikitext(m_team.rightmediumlinked(args['teamhist' .. i]))

Revision as of 00:09, 3 March 2019

To edit the documentation or categories for this module, click here.


local m_role = require('Module:Role')
local m_team = require('Module:Team')
local util_args = require('Module:ArgsUtil')

local p = {}

function p.teamHist(storeto, args)
	local i = 1
	if args['teamhist' .. 1] then
		local tbl = mw.html.create('table'):addClass('teamhist')
		while args['teamhist' .. i] do
			tbl:tag('tr')
			:tag('td')
				:addClass('teamdate')
				:wikitext(args['teamdate' .. i] or '')
			:done()
			:tag('td')
				:wikitext(m_role.onlyimage(args['teamrole' .. i]))
				:wikitext(' ')
				:wikitext(m_team.rightmediumlinked(args['teamhist' .. i]))
			i = i + 1
		end
		storeto.teamhist = tostring(tbl)
		i = i - 1
	end
	return {
		team = args['teamhist' .. i] and m_team.teamlinkname(args['teamhist' .. i]),
		date = args['teamdate' .. i],
		role = args['teamrole' .. i]
	}
end

return p