Modül:Toplardamar bilgi kutusu

Vikipedi, özgür ansiklopedi
Modül belgelemesi[oluştur]
local bilgi_kutusu = {}

local wikidata_mod = require("Modül:WikidataIB")
local ext_mod = require("Modül:Dış bağlantılar")

function bilgi_kutusu.infobox(frame)
	local entity = {}
	
	entity = mw.wikibase.getEntityObject()
	local resim = wikidata_mod.getVal(entity, "P18") or ""
	local altyazi = ""
	if resim ~= "" then
		resim = "[[Dosya:" .. resim .. "|250px]]"
	
		local qua = entity.claims["P18"][1].qualifiers
		if qua ~= nil then
			for k, v in pairs(qua["P2096"]) do
				if v.datavalue.value.language == "tr" then
					altyazi = v.datavalue.value.text
					break
				end
			end
		end
	end
	
	local resim2 = wikidata_mod.getVal(entity, "P6802") or ""
	local altyazi2 = ""
	if resim2 ~= "" then
		resim2 = "[[Dosya:" .. resim2 .. "|250px]]"
	
		local qua2 = entity.claims["P6802"][1].qualifiers
		if qua2 ~= nil then
			for k, v in pairs(qua2["P2096"]) do
				if v.datavalue.value.language == "tr" then
					altyazi2 = v.datavalue.value.text
					break
				end
			end
		end
	end

	local latince = wikidata_mod.getVal(entity, "P3982") or ""	
	local arter = wikidata_mod.getVal(entity, "P2286", true) or ""
	local kaynak = wikidata_mod.getVal(entity, "P1071", true) or ""
	local hedef = wikidata_mod.getVal(entity, "P5051", true) or ""
	local mesh = wikidata_mod.getVal(entity, "P486") or ""
	local fma = wikidata_mod.getVal(entity, "P1402") or ""
	local jstor = wikidata_mod.getVal(entity, "P3827") or ""
	local microsoft_academic = wikidata_mod.getVal(entity, "P6366") or ""
	local ta2 = wikidata_mod.getVal(entity, "P7173") or ""
	
	return frame:expandTemplate{ title = 'bilgi kutusu', args = {
		["gövdesınıfı"] = "vcard",
		["üst"] = mw.wikibase.getLabel(),
		["üstbiçim"] = "font-size: larger; background-color: #00CCCC; color: white;",
		["resim"] = resim,
		["altyazı"] = altyazi,
		["altyazıbiçimi"] = "font-size: 85%",
		["veri2"] = resim2,
		["veri3"] = "<div align='center'>" .. altyazi2 .. "</div>",
		["sırabiçimi3"] = "font-size: 85%",
		["etiket4"] = "Latince isim",
		["veri4"] = latince,
		["etiket5"] = "Boşalttığı ven",
		["veri5"] = kaynak,
		["etiket6"] = "Boşaldığı ven",
		["veri6"] = hedef,
		["etiket7"] = "[[Arter]]",
		["veri7"] = arter,
		["başlık8"] = "Tanımlayıcılar",
		["etiket9"] = "[[JSTOR]]",
		["veri9"] = ext_mod.jstor(jstor),
		["etiket10"] = "[[Microsoft Academic Search|Microsoft Academic]]",
		["veri10"] = ext_mod.microsoft_academic(microsoft_academic),
		["etiket11"] = "[[Medical Subject Headings|MeSH]]",
		["veri11"] = ext_mod.mesh(mesh),
		["etiket12"] = "[[Terminologia Anatomica|TA]]",
		["veri12"] = ext_mod.ta(ta2),
		["etiket13"] = "[[Foundational Model of Anatomy|FMA]]",
		["veri13"] = ext_mod.fma(fma),
	} }
end

return bilgi_kutusu