Module:Authority control/doc/Wikidata properties table and Module:Authority control/doc/Wikidata properties table/sandbox: Difference between pages

(Difference between pages)
Jump to navigation Jump to search
Page 1
Page 2
imported>Aidan9382
Function moved to new module
 
imported>WOSlinker
use require('strict') instead of require('Module:No globals')
 
Line 1: Line 1:
{{#invoke:Authority control/documentation|docConfTable}}
require('strict')
 
local authorityControl = require( "Module:Authority control" )
 
local p = {}
function p.conf( frame )
local doctable = '{| class="wikitable sortable"\n' ..
'! Parameter !! Label !! data-sort-type=number | Wikidata property'
for _, conf in pairs( authorityControl.conf ) do
local param = conf[1]
local link = conf[2]
local pid = conf[3]
local args = { id = 'f', pid }
local WPL = frame:expandTemplate{ title = 'Wikidata property link', args = args }
doctable = doctable .. '\n' ..
  '|-\n' ..
  '|' .. param .. '||' .. link .. '||data-sort-value=' .. pid .. '|' .. WPL
end
return doctable .. '\n|}'
end
 
return p