Modul:Taxonbar databases

Vikipediya saytından
Naviqasiyaya keç Axtarışa keç

Bu modulun sənədləşdirmə səhifəsi Modul:Taxonbar databases/doc səhifəsində yaradıla bilər

local p = {}

function p.list(frame)
	local nav  = require( 'Module:Navbox' )
	local conf = require( 'Module:Taxonbar/conf' ).databases
	local exclude = {
		['Wikidata'] = 'not citable',
		['Wikispecies'] = 'not citable',
		['emonocotfamily'] = 'redundant [[eMonocot]] link',
		['WSC genus'] = 'redundant [[World Spider Catalog]] link',
		['WSC family'] = 'redundant [[World Spider Catalog]] link',
	}
	local args = frame:getParent().args
	
	local elements = {}
	for _, c in pairs( conf ) do
		if exclude[c[1]] == nil then
			local c3 = tonumber(c[3])
			if (c3 and c3 > 0) or (c3 == nil) then
				table.insert( elements, c[2] )
			end
		end
	end
	
	return nav._navbox( {
			name        = 'Taksonlar üçün məlumat bazaları',
			title       = '[[Kömək:Takson eyniləşdirmələri|Taksonlar üçün məlumat bazaları]]',
			bodyclass   = 'hlist',
			state       = args.state or 'collapsed',
			list1       = table.concat( elements, ' • ' )
			} )
end

return p