Module:Documentation:修订间差异
小 导入1个版本 |
|||
| 第84行: | 第84行: | ||
-- 'documentation-toolbar' | -- 'documentation-toolbar' | ||
return format( | return format( | ||
'<span class="%s"> | '<span class="%s">(%s)</span>', | ||
message('toolbar-class'), | message('toolbar-class'), | ||
table.concat(ret, ' | ') | table.concat(ret, ' | ') | ||
| 第553行: | 第553行: | ||
--]] | --]] | ||
local docTitle = data.docTitle | local docTitle = data.docTitle | ||
local function wrap(link) | |||
return '<span class="doc-link">[</span>' .. link .. '<span class="doc-link">]</span>' | |||
end | |||
-- yes, we do intend to purge the template page on which the documentation appears | -- yes, we do intend to purge the template page on which the documentation appears | ||
local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) | local purgeLink = wrap(makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay)) | ||
if docTitle.exists then | if docTitle.exists then | ||
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) | local viewLink = wrap(makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)) | ||
local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) | local editLink = wrap(makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay)) | ||
local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) | local historyLink = wrap(makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay)) | ||
return | return viewLink .. editLink .. historyLink .. purgeLink | ||
else | else | ||
local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) | local createLink = wrap(makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)) | ||
return | return createLink .. purgeLink | ||
end | end | ||
return ret | return ret | ||
| 第738行: | 第743行: | ||
text = text .. (p.makeCategoriesBlurb(args, env) or '') | text = text .. (p.makeCategoriesBlurb(args, env) or '') | ||
end | end | ||
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" | text = text .. '' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" | ||
end | end | ||
end | end | ||
| 第783行: | 第788行: | ||
local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) | local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) | ||
return message('transcluded-from-blurb', {docLink}) | return message('transcluded-from-blurb', {docLink}) | ||
.. ' ' | .. '' | ||
.. makeToolbar(editLink, historyLink) | .. makeToolbar(editLink, historyLink) | ||
.. '<br />' | .. '<br />' | ||
| 第846行: | 第851行: | ||
compareLink = makeUrlLink(compareUrl, compareDisplay) | compareLink = makeUrlLink(compareUrl, compareDisplay) | ||
end | end | ||
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) | sandboxLinks = sandboxLink .. '' .. makeToolbar(sandboxEditLink, compareLink) | ||
else | else | ||
local sandboxPreload | local sandboxPreload | ||
| 第865行: | 第870行: | ||
local mirrorDisplay = message('mirror-link-display') | local mirrorDisplay = message('mirror-link-display') | ||
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) | local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) | ||
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) | sandboxLinks = message('sandbox-link-display') .. '' .. makeToolbar(sandboxCreateLink, mirrorLink) | ||
end | end | ||
if testcasesTitle.exists then | if testcasesTitle.exists then | ||
| 第878行: | 第883行: | ||
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) | ||
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) | testcasesLinks = testcasesLink .. '' .. makeToolbar(testcasesEditLink, testcasesRunLink) | ||
else | else | ||
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) | testcasesLinks = testcasesLink .. '' .. makeToolbar(testcasesEditLink) | ||
end | end | ||
else | else | ||
| 第892行: | 第897行: | ||
local testcasesCreateDisplay = message('testcases-create-link-display') | local testcasesCreateDisplay = message('testcases-create-link-display') | ||
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) | local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) | ||
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) | testcasesLinks = message('testcases-link-display') .. '' .. makeToolbar(testcasesCreateLink) | ||
end | end | ||
local messageName | local messageName | ||