모듈:Documentation: 두 판 사이의 차이

52 바이트 추가됨 ,  2020년 5월 8일 (금)
친절한사용자(토론)의 26369694판 편집을 되돌림: 오작동 https://tppr.me/Gu7Ol
편집 요약 없음
(친절한사용자(토론)의 26369694판 편집을 되돌림: 오작동 https://tppr.me/Gu7Ol)
129번째 줄: 129번째 줄:
local root = mw.html.create()
local root = mw.html.create()
root
root
:wikitext(p.protectionTemplate(env))
--:wikitext(p.protectionTemplate(env))
:wikitext(p.sandboxNotice(args, env))
:wikitext(p.sandboxNotice(args, env))
-- This div tag is from {{documentation/start box}}, but moving it here
-- This div tag is from {{documentation/start box}}, but moving it here
396번째 줄: 396번째 줄:
end
end


function p.protectionTemplate(env)
--function p.protectionTemplate(env)
-- Generates the padlock icon in the top right.
-- -- Generates the padlock icon in the top right.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- -- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- -- Messages:
-- 'protection-template' --> 'pp-template'
-- -- 'protection-template' --> 'pp-template'
-- 'protection-template-args' --> {docusage = 'yes'}
-- -- 'protection-template-args' --> {docusage = 'yes'}
local protectionLevels, mProtectionBanner
-- local protectionLevels, mProtectionBanner
local title = env.title
-- local title = env.title
protectionLevels = env.protectionLevels
-- protectionLevels = env.protectionLevels
if not protectionLevels then
-- if not protectionLevels then
return nil
-- return nil
end
-- end
local editProt = protectionLevels.edit and protectionLevels.edit[1]
-- local editProt = protectionLevels.edit and protectionLevels.edit[1]
local moveProt = protectionLevels.move and protectionLevels.move[1]
-- local moveProt = protectionLevels.move and protectionLevels.move[1]
if editProt then
-- if editProt then
-- The page is edit-protected.
-- -- The page is edit-protected.
mProtectionBanner = require('Module:Protection banner')
-- mProtectionBanner = require('Module:Protection banner')
local reason = message('protection-reason-edit')
-- local reason = message('protection-reason-edit')
return mProtectionBanner._main{'이유', '크기 = 작게'}
-- return mProtectionBanner._main{'이유', '크기 = 작게'}
elseif moveProt and moveProt ~= 'autoconfirmed' then
-- elseif moveProt and moveProt ~= 'autoconfirmed' then
-- The page is move-protected but not edit-protected. Exclude move
-- -- The page is move-protected but not edit-protected. Exclude move
-- protection with the level "autoconfirmed", as this is equivalent to
-- -- protection with the level "autoconfirmed", as this is equivalent to
-- no move protection at all.
-- -- no move protection at all.
mProtectionBanner = require('Module:Protection banner')
-- mProtectionBanner = require('Module:Protection banner')
return mProtectionBanner._main{action = '이동', '크기 = 작게'}
-- return mProtectionBanner._main{action = '이동', '크기 = 작게'}
else
-- else
return nil
-- return nil
end
-- end
end
--end


----------------------------------------------------------------------------
----------------------------------------------------------------------------
445번째 줄: 445번째 줄:
local links
local links
local content = (args.content or args["내용"])
local content = (args.content or args["내용"])
if not content or args[1] then
if not content then
-- No need to include the links if the documentation is on the template page itself.
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
local linksData = p.makeStartBoxLinksData(args, env)
715번째 줄: 715번째 줄:
fmargs.image = 'none'
fmargs.image = 'none'
fmargs.style = message('fmbox-style') -- Sets 'background-color: #ecfcf4'
fmargs.style = message('fmbox-style') -- Sets 'background-color: #ecfcf4'
fmargs.textstyle = message('fmbox-textstyle') -- 'font-style: italic;'
-- fmargs.textstyle = message('fmbox-textstyle') -- 'font-style: italic;'


-- Assemble the fmbox text field.
-- Assemble the fmbox text field.
익명 사용자