Module:Documentation: Difference between revisions

m
1 revision imported from w:en:Module:Documentation
m (1 revision imported: Infobox city Japan)
m (1 revision imported from w:en:Module:Documentation)
Line 136:
:attr('id', message('main-div-id'))
:addClass(message('main-div-classes'))
:css('padding', '12px')
:newline()
:wikitext(p._startBox(args, env))
Line 404 ⟶ 405:
-- 'protection-template' --> 'pp-template'
-- 'protection-template-args' --> {docusage = 'yes'}
local protectionLevels, mProtectionBanner
local title = env.title
local protectionLevels, mProtectionBanner
if title.namespace ~= 10 and title.namespace ~= 828 then
local protectionTemplate = message('protection-template')
local namespace = title.namespace
if title.not (protectionTemplate and (namespace ~== 10 andor title.namespace ~== 828)) then
-- Don't display the protection template if we are not in the template or module namespaces.
return nil
Line 414 ⟶ 417:
return nil
end
local editProteditLevels = protectionLevels.edit and protectionLevels.edit[1]
local moveProtmoveLevels = protectionLevels.move and protectionLevels.move[1]
if moveLevels and moveLevels[1] == 'sysop' or editLevels and editLevels[1] then
if editProt then
-- The page is editfull-move protected, or full, template, or semi-protected.
local frame = mw.getCurrentFrame()
mProtectionBanner = require('Module:Protection banner')
localreturn reasonframe:expandTemplate{title = protectionTemplate, args = message('protection-reasontemplate-editargs', nil, 'table')}
return mProtectionBanner._main{reason, small = true}
elseif moveProt and moveProt ~= 'autoconfirmed' then
-- The page is move-protected but not edit-protected. Exclude move
-- protection with the level "autoconfirmed", as this is equivalent to
-- no move protection at all.
mProtectionBanner = require('Module:Protection banner')
return mProtectionBanner._main{action = 'move', small = true}
else
return nil