Zum Inhalt springen

Modul:Documentation: Unterschied zwischen den Versionen

480 Bytes hinzugefügt ,  27. April 2016
syncing with sandbox (except /sandbox) (testcases now have a convenient run link for navigation)
K (1 Version importiert)
dewiki>Andy M. Wang
(syncing with sandbox (except /sandbox) (testcases now have a convenient run link for navigation))
Zeile 136: Zeile 136:
:attr('id', message('main-div-id'))
:attr('id', message('main-div-id'))
:addClass(message('main-div-classes'))
:addClass(message('main-div-classes'))
:css('padding', '12px')
:newline()
:newline()
:wikitext(p._startBox(args, env))
:wikitext(p._startBox(args, env))
Zeile 405: Zeile 404:
-- 'protection-template' --> 'pp-template'
-- 'protection-template' --> 'pp-template'
-- 'protection-template-args' --> {docusage = 'yes'}
-- 'protection-template-args' --> {docusage = 'yes'}
local protectionLevels, mProtectionBanner
local title = env.title
local title = env.title
local protectionLevels
local protectionTemplate = message('protection-template')
local namespace = title.namespace
if not (protectionTemplate and (namespace == 10 or namespace == 828)) then
-- Don't display the protection template if we are not in the template or module namespaces.
return nil
end
protectionLevels = env.protectionLevels
protectionLevels = env.protectionLevels
if not protectionLevels then
if not protectionLevels then
return nil
return nil
end
end
local editLevels = protectionLevels.edit
local editProt = protectionLevels.edit and protectionLevels.edit[1]
local moveLevels = protectionLevels.move
local moveProt = protectionLevels.move and protectionLevels.move[1]
if moveLevels and moveLevels[1] == 'sysop' or editLevels and editLevels[1] then
if editProt then
-- The page is full-move protected, or full, template, or semi-protected.
-- The page is edit-protected.
local frame = mw.getCurrentFrame()
mProtectionBanner = require('Module:Protection banner')
return frame:expandTemplate{title = protectionTemplate, args = message('protection-template-args', nil, 'table')}
local reason = message('protection-reason-edit')
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
else
return nil
return nil
Zeile 861: Zeile 861:
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
end
if testcasesTitle.exists then
if testcasesTitle and testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesDisplay = message('testcases-link-display')
Zeile 868: Zeile 868:
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
-- for Modules, add testcases run link if exists
if subjectSpace == 828 and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)
else
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
end
else
else
local testcasesPreload
local testcasesPreload
Anonymer Benutzer
Cookies helfen uns bei der Bereitstellung von Android Wiki. Durch die Nutzung von Android Wiki erklärst du dich damit einverstanden, dass wir Cookies speichern.