Anonimo

Modulo:DTGenerico: differenze tra le versioni

Da Wikitrek.
ListHTData
mNessun oggetto della modifica
(ListHTData)
Riga 76: Riga 76:
AllRows[#AllRows + 1] = {"In originale:", {mw.wikibase.getLabelByLang(ItemQ, 'en')}}
AllRows[#AllRows + 1] = {"In originale:", {mw.wikibase.getLabelByLang(ItemQ, 'en')}}
end
end
if (mw.wikibase.getLabelByLang(ItemQ, 'it')) and (mw.wikibase.getLabelByLang(ItemQ, 'en')) ~= PageTitle.text then
if (mw.wikibase.getLabelByLang(ItemQ, 'it')) and (mw.wikibase.getLabelByLang(ItemQ, 'it')) ~= PageTitle.text then
AllRows[#AllRows + 1] = {"In italiano:", {mw.wikibase.getLabelByLang(ItemQ, 'it')}}
AllRows[#AllRows + 1] = {"In italiano:", {mw.wikibase.getLabelByLang(ItemQ, 'it')}}
end
end
Riga 162: Riga 162:
end
end
end
end
--- Function to query for HyperTrek migration data and to construct a proper box
-- to show them, if present
-- @param frame Data from MW session
-- @param AddSemantic Boolean value to instruct about adding SMW prefix
-- @return DIV with HT migration in it or empty string
function p.ListHTData(frame)
local Item = mw.wikibase.getEntity()
if not Item then
Item = mw.wikibase.getEntity('Q1')
end
if AddSemantic == nil then
AddSemantic = true
end
if Item.claims['P79'] then
local DIV = mw.html.create('div')
local DataString
DataString = "Informazioni importate dal database di '''HyperTrek''' datato " .. Item.claims['P79'].datavalue.value.time
DIV
:addClass('catlinks')
:attr('id', 'htdata')
:wikitext(DataString)
return tostring(DIV)
else
return ""
end
end
--[==[
--[==[
function p.ExtLinks(frame)
function p.ExtLinks(frame)