Модуль:Сущность: различия между версиями

мНет описания правки
мНет описания правки
Строка 37: Строка 37:


local function makeSourceLink(s)
local function makeSourceLink(s)
     local className = s.name .. (s.kind == "component" and "Component" or "Prototype")
     local className = s.name
        .. (s.kind and (s.kind:sub(1, 1):upper() .. s.kind:sub(2)) or "")
     local tplLabel = "Template:" .. s.tplPath
     local tplLabel = "Template:" .. s.tplPath
     return "[[" .. tplLabel .. "|" .. className .. "]]"
     return "[[" .. tplLabel .. "|" .. className .. "]]"
Строка 206: Строка 207:
function p.preview(frame)
function p.preview(frame)
     local args = getArgs(frame, { removeBlanks = false })
     local args = getArgs(frame, { removeBlanks = false })
     local tplPath = args[1] or args.tpl or args.template or ""
     local tplPath = args[1] or ""
     if tplPath == "" then return "" end
     if tplPath == "" then return "" end