Nicht angemeldeter Benutzer - Bearbeiten von Seiten ist nur als angemeldeter Benutzer möglich.
Änderungen
Zur Navigation springen
Zur Suche springen
Zeile 1:
Zeile 1:
− +
− serial = "2017-01-01" } +
Zeile 123:
Zeile 123:
− +
+
Zeile 147:
Zeile 148:
− +
Zeile 425:
Zeile 426:
− +
− local typed = param.type
+
+
+
+
+
+
+
Zeile 501:
Zeile 508:
− +
− +
Zeile 707:
Zeile 714:
− +
+
Zeile 774:
Zeile 782:
− if v == "" then
− s = "empty"
− end
Zeile 839:
Zeile 844:
− elseif s ~= "empty" then +
Zeile 859:
Zeile 864:
− +
2017-03-27
local TemplateData = { suite = "TemplateData",
local TemplateData = { serial = "2017-03-27",
suite = "TemplateData" }
--[=[
--[=[
improve template:TemplateData
improve template:TemplateData
local function facility( about )
local function facility( about, asked )
-- Create description head
-- Create description head
-- Parameter:
-- Parameter:
-- about -- table, supposed to contain description
-- about -- table, supposed to contain description
-- asked -- true, if mandatory description
-- Returns <block>, with head, or nil
-- Returns <block>, with head, or nil
local para = mw.html.create( "p" )
local para = mw.html.create( "p" )
end -- for k, v
end -- for k, v
end
end
elseif Config.solo then
elseif Config.solo and asked then
para:addClass( "error" )
para:addClass( "error" )
:wikitext( Config.solo )
:wikitext( Config.solo )
local ranking = { "required", "suggested", "optional", "deprecated" }
local ranking = { "required", "suggested", "optional", "deprecated" }
local r = mw.html.create( "tr" )
local r = mw.html.create( "tr" )
local sort = param.label or access
local sort, typed
for k, v in pairs( param ) do
if v == "" then
param[ k ] = false
end
end -- for k, v
-- label
-- label
sort = param.label or access
if sort:match( "^%d+$" ) then
if sort:match( "^%d+$" ) then
begin:attr( "data-sort-value",
begin:attr( "data-sort-value",
-- type
-- type
if typed then
if param.type then
s = Permit.types[ typed ]
s = Permit.types[ param.type ]
typed = mw.html.create( "td" )
typed = mw.html.create( "td" )
if s then
if s then
local function flush()
local function flush()
-- JSON encode narrowed input; obey unnamed (numerical) parameters -- Returns <templatedata> JSON string
-- JSON encode narrowed input; obey unnamed (numerical) parameters
-- Returns <templatedata> JSON string
local r
local r
if Data.tag then
if Data.tag then
if s == "string" then
if s == "string" then
v = mw.text.trim( v )
v = mw.text.trim( v )
end
end
if scope:find( s, 1, true ) then
if scope:find( s, 1, true ) then
tag[ k ] = v
tag[ k ] = v
end
end
else
s = string.format( "Type <code>%s</code> bad for %s",
s = string.format( "Type <code>%s</code> bad for %s",
scope, f( k, slot ) )
scope, f( k, slot ) )
-- Returns <div>
-- Returns <div>
local r = mw.html.create( "div" )
local r = mw.html.create( "div" )
local s = facility( Data.tree )
local s = facility( Data.tree, true )
if s then
if s then
r:node( s )
r:node( s )