وحدة:Wikidata2: الفرق بين النسختين

[نسخة منشورة][نسخة منشورة]
تم حذف المحتوى تمت إضافة المحتوى
طلا ملخص تعديل
ط Add options.page
سطر 79:
end
return getqualifierbysortingproperty(claim, sortingproperty)
end
 
function get_entityId(options)
local id = options.entityId
if not id or id == "" then
if options.page and options.page ~= "" then
id = mw.wikibase.getEntityIdForTitle( options.page )
end
end
mw.log("id :" .. id)
return id
end
 
السطر 327 ⟵ 338:
jurisdiction=P1001,
employer=P108,
entityId=options.entityId} }
} }
end
السطر 416 ⟵ 429:
if options.entity and type( options.entity ) == "table" then
entity = options.entity
else
--entity = getEntityFromId( options.entityId )
id = get_entityId( options )
entity = getEntityFromId( id )
end
السطر 1٬268 ⟵ 1٬283:
function p.getSiteLink( frame )
local site = frame.args[2] or frame.args.site
local id = frame.args[1] or frame.args.id
if not id or id == "" then
local link = sitelink( id , site )
if frame.args.page and frame.args.page ~= "" then
id = mw.wikibase.getEntityIdForTitle( frame.args.page )
end
end
local link = sitelink( id , site )
if link and link ~= '' then
return link
end
end