Module:TeamMembers/Settings

From Leaguepedia | League of Legends Esports Wiki
Jump to: navigation, search

Documentation for this module may be created at Module:TeamMembers/Settings/doc

local util_vars = require("Module:VarsUtil")

local ret = {
	current = {
		columns = { 'Residency', 'Country', 'PlayerDisplay', 'IRLNameDisplay', 'RoleDisplay', 'ContractEnd', 'DateDisplayJoinWithPopup', },
		where = 'Tenures.IsCurrent="1"',
		sort = 'role',
		sort_fields = { 'SortKeyRole', 'SortKeyName' },
		sort_ascending = { true, true },
		parent_class = 'team-members-current',
	},
	former = {
		columns = { 'Residency', 'Country', 'PlayerDisplay', 'IRLNameDisplay', 'RoleDisplay', 'DateDisplayJoin', 'DateDisplayLeave', 'NextTeamDisplay', },
		where = 'Tenures.IsCurrent="0"',
		sort = 'leave',
		sort_fields = { 'SortKeyLeave', 'SortKeyRole', 'SortKeyName' },
		sort_ascending = { false, true, true },
	},
	all = {
		columns = {},
	},
	classes = {
		PlayerDisplay = 'team-members-player',
		DateDisplayJoin = 'team-members-date-joined',
		DateDisplayLeave = 'team-members-date-left',
		ContractEnd = 'team-members-date-contract',
		RoleDisplay = 'team-members-role',
	},
	attrs = {
		RoleDisplay = { ['data-sort-type'] = 'number', },
		DateDisplayJoin = { ['data-sort-type'] = 'number', },
		DateDisplayLeave = { ['data-sort-type'] = 'number', },
	},
}

for _, v in ipairs({'current', 'former', 'all'}) do
	ret[v].columns.classes = ret.classes
	ret[v].columns.attrs = ret.attrs
end

return ret