Anonymous user
Module:Documentation: Difference between revisions
use title.protectionLevels instead of {{PROTECTIONLEVEL}} in p.protectionTemplate
(latest change added) |
(use title.protectionLevels instead of {{PROTECTIONLEVEL}} in p.protectionTemplate) |
||
Line 170:
--
-- Data includes:
-- env.protectionLevels - the protection levels table of the title object.
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
Line 269 ⟶ 270:
--]]
return env.templateTitle:subPageTitle(message('print-subpage'))
end▼
function envFuncs.protectionLevels()
-- The protection levels table of the title object.
return env.title.protectionLevels
end
Line 330 ⟶ 336:
-- 'sandbox-notice-blurb' --> 'This is the $1 for $2.'
-- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).'
-- 'sandbox-notice-pagetype-template' --> '[[
-- 'sandbox-notice-pagetype-module' --> '[[
-- 'sandbox-notice-pagetype-other' --> 'sandbox page'
-- 'sandbox-notice-compare-link-display' --> 'diff'
Line 393 ⟶ 399:
-- 'protection-template-args' --> {docusage = 'yes'}
local title = env.title
local protectionLevels
local protectionTemplate = message('protection-template')
local namespace = title.namespace
Line 399 ⟶ 406:
return nil
end
protectionLevels = env.protectionLevels
local frame = mw.getCurrentFrame()▼
local editLevels = protectionLevels.edit
local moveLevels = protectionLevels.move
if moveLevels and moveLevels[1] == 'sysop' or editLevels and editLevels[1] then
return level▼
else▼
▲ end
-- The page is full-move protected, or full, template, or semi-protected.
return frame:expandTemplate{title = protectionTemplate, args = message('protection-template-args', nil, 'table')}
end
end
Line 734 ⟶ 735:
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[
-- is [[
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[
--]=]
local docTitle = env.docTitle
Line 924 ⟶ 925:
-- Messages:
-- 'print-link-display' --> '/Print'
-- 'print-blurb' --> 'A [[
-- .. ' of this template exists at $1.'
-- .. ' If you make a change to this template, please update the print version as well.'
Line 959 ⟶ 960:
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> '
--
-- /testcases pages in the module namespace are not categorised, as they may have
|