Content deleted Content added
change sorting |
remove reliance on subtemplate for p.confdoc, use mw.html for table manipulation |
||
Line 6:
function p.confdoc( frame )
local wikitable =
wikitable:addClass('wikitable sortable')
:tag('caption')
:wikitext('Taxon identifiers by parameter name')
:tag('tr')
:tag('th')
:wikitext('Parameter')
:tag('th')
:attr('data-sort-type', 'number')
:css('white-space', 'nowrap')
:wikitext('Wikidata ID')
:tag('th')
:wikitext('Authority')
:tag('th')
:wikitext('Description')
local format = string.format
for _, db in pairs( conf.databases ) do
local param = mw.ustring.lower(db[1])▼
local prop = db[3]
if type(prop) == 'number' and prop > 0 then
▲ local param = mw.ustring.lower(db[1])
row
:tag('td')
:wikitext(param)
:tag('td')
:attr('data-sort-value', prop)
:wikitext(format('[[d:Property:P%d|P%d]]', prop, prop))
-- {{#statements:P1629|from=P{{{1|}}}}}
:tag('td')
:wikitext(frame:callParserFunction{
name = '#statements:P1629',
args = { from = 'P' .. prop }
})
:tag('td')
:wikitext(mw.wikibase.getDescription('P' .. prop))
wikitable:node(row)
end
end
return wikitable
end
--[[ p.wikidataInfo( frame )
|