NBA 2K Esports Wiki
[checked revision][checked revision]
Donut (talk | contribs)
(Syncing content across wikis)
 
Donut (talk | contribs)
m (Syncing content across wikis)
Line 1: Line 1:
local Role = require('Module:Role').role
+
local m_role = require('Module:Role')
 
local Team = require('Module:Team').team
 
local Team = require('Module:Team').team
   
Line 15: Line 15:
 
:done()
 
:done()
 
:tag('td')
 
:tag('td')
  +
:wikitext(m_role.onlyimage(args['teamrole' .. i], { sub = args['issub' .. i] }))
:wikitext(Role{
 
args['teamrole' .. i] or '',
 
'onlyimage',
 
sub = args['issub' .. i]
 
})
 
 
:wikitext(' ')
 
:wikitext(' ')
 
:wikitext(Team{args['teamhist' .. i], 'rightmediumlinked'})
 
:wikitext(Team{args['teamhist' .. i], 'rightmediumlinked'})

Revision as of 04:00, 18 November 2018

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


local m_role = require('Module:Role')
local Team = require('Module:Team').team

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], { sub = args['issub' .. i] }))
				:wikitext(' ')
				:wikitext(Team{args['teamhist' .. i], 'rightmediumlinked'})
			i = i + 1
		end
		storeto.teamhist = tostring(tbl)
		i = i - 1
	end
	return {
		team = Team{args['teamhist' .. i],'teamlinkname'},
		date = args['teamdate' .. i],
		role = args['teamrole' .. i]
	}
end

return p