66 689
contributi
mNessun oggetto della modifica |
(New routine for navigator tables) |
||
Riga 85: | Riga 85: | ||
local HTMLTable | local HTMLTable | ||
local CollectionTable = '' | local CollectionTable = '' | ||
local ExcludeP = {P3 = true, P14 = false, P21 = true | local ExcludeP = {P3 = true, P7 = true, P14 = false, P21 = true, P23 = true, P26 = true, P30 = true, P37 = true, P58 = true, P68 = true, P52 = true, P79 = true, P90 = true} | ||
local POnTree = {} | local POnTree = {} | ||
local Item = mw.wikibase.getEntity() | local Item = mw.wikibase.getEntity() | ||
Riga 259: | Riga 259: | ||
-- return HTMLTable | -- return HTMLTable | ||
return tostring(HTMLTable) .. CollectionTable | return tostring(HTMLTable) .. CollectionTable | ||
end | |||
function p.ProcessNavigators(frame) | |||
local CollectionTable | |||
local Item = mw.wikibase.getEntity() | |||
local ItemQ = mw.wikibase.getEntityIdForCurrentPage() | |||
if not Item then | |||
Item = mw.wikibase.getEntity('Q1') | |||
end | |||
if Item.claims['P7'] or Item.claims['P23'] then | |||
--Previous or Next | |||
CollectionTable = MakeNavTable(Item.claims, nil) | |||
end | |||
if Item.claims['P46'] then | |||
-- Arc | |||
CollectionTable = CollectionTable .. string.char(10) .. MakeNavTable(Item.claims[Property][1].qualifiers, Item.claims[Property][1].mainsnak.datavalue.value) | |||
end | |||
return CollectionTable | |||
end | end | ||
function p.Incipit(frame) | function p.Incipit(frame) |