Modulo:DTGenerico: differenze tra le versioni

Vai alla navigazione Vai alla ricerca
m
nessun oggetto della modifica
mNessun oggetto della modifica
mNessun oggetto della modifica
(2 versioni intermedie di uno stesso utente non sono mostrate)
Riga 56: Riga 56:
local HTMLTable
local HTMLTable
local CollectionTable = ''
local CollectionTable = ''
local ExcludeP = {P37 = true, P3 = true, P26 = true, P68 = true}
local ExcludeP = {P37 = true, P3 = true, P26 = true, P58 = true, P68 = true}
local Item = mw.wikibase.getEntity()
local Item = mw.wikibase.getEntity()
local ItemQ = mw.wikibase.getEntityIdForCurrentPage()
local ItemQ = mw.wikibase.getEntityIdForCurrentPage()
Riga 68: Riga 68:
AllP = mw.wikibase.orderProperties(Item:getProperties())
AllP = mw.wikibase.orderProperties(Item:getProperties())
if (mw.wikibase.getLabelByLang(mw.wikibase.getEntityIdForCurrentPage(), 'en')) then
if (mw.wikibase.getLabelByLang(mw.wikibase.getEntityIdForCurrentPage(), 'en')) and (mw.wikibase.getLabelByLang(mw.wikibase.getEntityIdForCurrentPage(), 'en')) ~= mw.title.getCurrentTitle then
AllRows[#AllRows + 1] = {"In originale:", {mw.wikibase.getLabelByLang(mw.wikibase.getEntityIdForCurrentPage(), 'en')}}
AllRows[#AllRows + 1] = {"In originale:", {mw.wikibase.getLabelByLang(mw.wikibase.getEntityIdForCurrentPage(), 'en')}}
end
end
Riga 89: Riga 89:
local Value = SnakValue.mainsnak.datavalue['value']
local Value = SnakValue.mainsnak.datavalue['value']
if (type(Value) == "table") then
if (type(Value) == "table") then
if Property == "P72" then --Assigments
if Property == "P72" then --CASE Assigments
AccValues[#AccValues + 1] = "Anno " .. LabelOrLink(Value['id']) .. "occupazione, " .. "grado"
AccValues[#AccValues + 1] = LabelOrLink(SnakValue.qualifiers['P73'][1].datavalue.value['id']) .. " " .. LabelOrLink(Value['id']) .. " " .. LabelOrLink(SnakValue.qualifiers['P76'][1].datavalue.value['id']) .. " " .. LabelOrLink(SnakValue.qualifiers['P77'][1].datavalue.value['id'])
elseif Value['entity-type'] == 'item' then
elseif Value['entity-type'] == 'item' then
AccValues[#AccValues + 1] = LabelOrLink(Value['id'])
AccValues[#AccValues + 1] = LabelOrLink(Value['id'])

Menu di navigazione