Bearbeiten von „Modul:Infobox“
Die Bearbeitung kann rückgängig gemacht werden. Bitte prüfe den Vergleich unten, um sicherzustellen, dass du dies tun möchtest, und veröffentliche dann unten deine Änderungen, um die Bearbeitung rückgängig zu machen.
Aktuelle Version | Dein Text | ||
Zeile 138: | Zeile 138: | ||
function renderSensors() | function renderSensors() | ||
local entity = mw.wikibase.getEntityObject() | local entity = mw.wikibase.getEntityObject() | ||
result = '' | result = '' | ||
if not entity or not entity.claims then return end --the entity doesnt exist or have no claims | if not entity or not entity.claims then return end --the entity doesnt exist or have no claims | ||
local property = entity.claims[ | local property = entity.claims['P57'] | ||
if property then | if property then | ||
for key, prop in pairs(property) do | for key, prop in pairs(property) do | ||
Zeile 160: | Zeile 152: | ||
end | end | ||
function renderAmazon( | function renderAmazon() | ||
local entity = mw.wikibase.getEntityObject() | local entity = mw.wikibase.getEntityObject() | ||
result = '' | result = '' | ||
Zeile 166: | Zeile 158: | ||
local property = entity.claims['P8'] | local property = entity.claims['P8'] | ||
if property and property[1] and property[1].mainsnak and property[1].mainsnak.datavalue then | if property and property[1] and property[1].mainsnak and property[1].mainsnak.datavalue then | ||
result = | result = result .. "Amazon|" .. getValueLabel(property[1].mainsnak.datavalue) .. "|" .. entity:getLabel() .. " bei Amazon" | ||
end | end | ||
return result | return result | ||
Zeile 199: | Zeile 191: | ||
local propValue = prop.mainsnak.datavalue | local propValue = prop.mainsnak.datavalue | ||
result = result .. ", " .. getValue(prop) .. "-Kern"; | result = result .. ", " .. getValue(prop) .. "-Kern"; | ||
if | if prop.qualifiers["P32"] and prop.qualifiers["P32"][1] and prop.qualifiers["P32"][1].datavalue then | ||
result = result .. " " .. getValueLabel(prop.qualifiers["P32"][1].datavalue) .. " CPU" | result = result .. " " .. getValueLabel(prop.qualifiers["P32"][1].datavalue) .. " CPU" | ||
end | end | ||
end | end | ||
Zeile 215: | Zeile 205: | ||
renderCPU = renderCPU, | renderCPU = renderCPU, | ||
renderSensors = renderSensors, | renderSensors = renderSensors, | ||
renderAmazon = renderAmazon, | renderAmazon = renderAmazon, | ||
} | } |