Difference between revisions of "Module:Authority control/doc/Wikidata properties table"
Jump to navigation
Jump to search
blackwiki>Reedy (Fix first col sorting) |
blackwiki>Tom.Reding (Convert to self-creating doc module (Why do I get the feeling this won't work w/o admin intervention... *fingers crossed for auto-detecting Lua in module space*)) |
||
| Line 1: | Line 1: | ||
| − | {| class="wikitable sortable" | + | require('Module:No globals') |
| − | ! Parameter !! Label !! data-sort-type=number | Wikidata property | + | |
| − | + | 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 | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |- | ||
| − | | | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Revision as of 19:02, 24 May 2018
require('Module:No globals')
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