Module:Infobox Armour Group

Module documentation
This documentation is transcluded from Template:No documentation/doc. [edit] [history] [purge]
This module does not have any documentation. Please consider adding documentation at Module:Infobox Armour Group/doc. [edit]
Module:Infobox Armour Group's function main is invoked by Template:Infobox Armour Group.
Module:Infobox Armour Group requires Module:Infobox.

-- Module for [[Template:Infobox Armour Group]]

local p = {}

local infobox = require('Module:Infobox')

-- Main function called with invokes
function p.main(frame)
	local args = frame:getParent().args
	local ret = infobox.new(args)

	ret:defineParams{
		{ name = 'name', func = 'name' },
		{ name = 'images', func = 'has_content' },
		{ name = 'slot', func = 'has_content' },
		{ name = 'type', func = 'has_content' },
	}

	ret:defineLinks({ hide = true })

	ret:create()
	ret:cleanParams()

	ret:defineName('Infobox Armour Group')

	ret:addRow{
		{ tag = 'argh', content = 'name', class='infobox-header', colspan = '20' }
	}
	ret:pad(20)
	ret:addRow{
		{ tag = 'argd', content = 'images', class='infobox-image', colspan = '20' }
	}
	ret:pad(20)
	ret:addRow{
		{ tag = 'th', content = '[[Slot]]', colspan = '7' },
		{ tag = 'argd', content = 'slot', colspan = '13' }
	}
	if ret:paramDefined('type') then
		ret:addRow{
			{ tag = 'th', content = 'Type', colspan = '7' },
			{ tag = 'argd', content = 'type', colspan = '13' }
		}
	end
	ret:pad(20)

	return ret:tostring()
end

return p