Modul:TemplateData: Unterschied zwischen den Versionen
2018-01-23
wp>PerfektesChaos (2018-01-22) |
wp>PerfektesChaos (2018-01-23) |
||
Zeile 1: | Zeile 1: | ||
local TemplateData = { serial = "2018-01- | local TemplateData = { serial = "2018-01-23", | ||
suite = "TemplateData", | suite = "TemplateData", | ||
item = 46997995 } | item = 46997995 } | ||
Zeile 12: | Zeile 12: | ||
basicCnf = { catProblem = "strange", | basicCnf = { catProblem = "strange", | ||
classNoNumTOC = "suppressTOCnum", | classNoNumTOC = "suppressTOCnum", | ||
cssParWrap = "cssTabWrap", | |||
cssParams = "cssTable", | cssParams = "cssTable", | ||
docpageCreate = "suffix", | docpageCreate = "suffix", | ||
docpageDetect = "subpage", | docpageDetect = "subpage", | ||
Zeile 62: | Zeile 62: | ||
} | } | ||
local Permit = { | local Permit = { | ||
colors = { required = "EAF3FF", | colors = { tableheadbg = "B3B7FF", | ||
required = "EAF3FF", | |||
suggested = "FFFFFF", | suggested = "FFFFFF", | ||
optional = "EAECF0", | optional = "EAECF0", | ||
deprecated = "FFCBCB | deprecated = "FFCBCB" }, | ||
params = { aliases = "table", | params = { aliases = "table", | ||
autovalue = "string", | autovalue = "string", | ||
Zeile 657: | Zeile 657: | ||
:wikitext( " " ) | :wikitext( " " ) | ||
end | end | ||
if type( boole.show ) == "string" then | |||
local v = mw.html.create( "span" ) | |||
:wikitext( boole.show ) | |||
if boole.css then | |||
v:css( boole.css ) | |||
end | |||
dd:node( v ) | |||
end | |||
if type( boole.suffix ) == "string" then | if type( boole.suffix ) == "string" then | ||
dd:wikitext( boole.suffix ) | dd:wikitext( boole.suffix ) | ||
end | |||
if boole.lead == false then | |||
dd:wikitext( " " ) | |||
:node( mw.html.create( "code" ) | |||
:wikitext( show ) ) | |||
end | end | ||
else | else | ||
Zeile 1.218: | Zeile 1.228: | ||
if since == "wikidata" then | if since == "wikidata" then | ||
local item = TemplateData.item | local item = TemplateData.item | ||
if type( item ) == "number" and item > 0 then | if type( item ) == "number" and item > 0 then | ||
local entity = mw.wikibase.getEntity( string.format( "Q%d", | local entity = mw.wikibase.getEntity( string.format( "Q%d", | ||
Zeile 1.227: | Zeile 1.236: | ||
type( vsn.value) == "string" and | type( vsn.value) == "string" and | ||
vsn.value ~= "" then | vsn.value ~= "" then | ||
r = vsn.value | |||
end | end | ||
end | end | ||
end | end | ||
end | end | ||
if not since or since <= TemplateData.serial then | if r then | ||
elseif not since or since <= TemplateData.serial then | |||
r = TemplateData.serial | r = TemplateData.serial | ||
else | else |