Module:Documentation: Difference between revisions
Content added Content deleted
SecurityXP (talk | contribs) m (1 revision imported: Template) Tags: Mobile edit Mobile web edit |
SecurityXP (talk | contribs) No edit summary |
||
Line 362: | Line 362: | ||
else |
else |
||
pagetype = message('sandbox-notice-pagetype-other') |
pagetype = message('sandbox-notice-pagetype-other') |
||
⚫ | |||
local pagetypee |
|||
if subjectSpace == 10 then |
|||
pagetypee = message('template-pagetype') |
|||
elseif subjectSpace == 828 then |
|||
pagetypee = message('module-pagetype') |
|||
else |
|||
pagetypee = message('other-pagetype') |
|||
end |
end |
||
local templateLink = makeWikilink(templateTitle.prefixedText) |
local templateLink = makeWikilink(templateTitle.prefixedText) |
||
Line 384: | Line 376: | ||
local testcasesTitle = env.testcasesTitle |
local testcasesTitle = env.testcasesTitle |
||
if testcasesTitle and testcasesTitle.exists then |
if testcasesTitle and testcasesTitle.exists then |
||
if testcasesTitle. |
if testcasesTitle.contentModel == "Scribunto" then |
||
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') |
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') |
||
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') |
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') |
||
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) |
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) |
||
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) |
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) |
||
text = text .. '<br / |
text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) |
||
else |
else |
||
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') |
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') |
||
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) |
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) |
||
text = text .. '<br / |
text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) |
||
end |
end |
||
end |
end |
||
Line 453: | Line 445: | ||
local links |
local links |
||
local content = args.content |
local content = args.content |
||
if not content then |
if not content or args[1] 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) |
||
Line 491: | Line 483: | ||
if not title or not docTitle then |
if not title or not docTitle then |
||
return nil |
return nil |
||
⚫ | |||
if docTitle.isRedirect then |
|||
docTitle = docTitle.redirectTarget |
|||
end |
end |
||
Line 878: | Line 873: | ||
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) |
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay) |
||
-- for Modules, add testcases run link if exists |
-- for Modules, add testcases run link if exists |
||
if |
if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then |
||
local testcasesRunLinkDisplay = message('testcases-run-link-display') |
local testcasesRunLinkDisplay = message('testcases-run-link-display') |
||
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) |
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) |