440
edits
(merge templatestyles) |
m (1 revision imported from templatewiki:Module:Documentation) |
||
(12 intermediate revisions by 9 users not shown) | |||
Line 80:
ret[#ret + 1] = select(i, ...)
end
-- '
return '<span class="' .. message('toolbar-class') .. '">('
.. table.concat(ret, ' | ') .. ')</span>'
Line 137:
:wikitext(p.sandboxNotice(args, env))
:tag('div')
-- '
:addClass(message('container'))
:attr('role', 'complementary')
:attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil)
:attr('aria-label', args.heading == '' and 'Documentation' or nil)
:newline()
:tag('div')
-- '
:addClass(message('main-div-classes'))
:newline()
Line 147 ⟶ 150:
:wikitext(p._content(args, env))
:tag('div')
-- '
:addClass(message('clear'))
:done()
Line 177 ⟶ 180:
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
--
-- Data includes:
Line 271 ⟶ 273:
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
Line 417 ⟶ 410:
omargs.text = text .. makeCategoryLink(message('sandbox-category'))
-- '
return '<div class="' .. message('clear') .. '"></div>'
.. require('Module:Message box').main('ombox', omargs)
Line 498 ⟶ 491:
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
Line 524 ⟶ 516:
local preload = args.preload
if not preload then
if subjectSpace ==
preload = message('module-preload')
else
Line 539 ⟶ 529:
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create][purge] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
Line 553 ⟶ 543:
local docTitle = data.docTitle
local title = data.title
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
▲ local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
Line 563 ⟶ 553:
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink, purgeLink)
end
return ret
Line 616 ⟶ 606:
data.headingStyleText = headingStyle
else
-- '
data.headingClass = message('main-div-heading-class')
end
Line 635 ⟶ 625:
local sbox = mw.html.create('div')
sbox
-- '
:addClass(message('start-box-class'))
:newline()
:tag('span')
:addClass(data.headingClass)
:attr('id', 'documentation-heading')
:cssText(data.headingStyleText)
:wikitext(data.heading)
Line 740 ⟶ 731:
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
end
end
local box = mw.html.create('div')
-- '
box:
:addClass(message('end-box-class'))
-- 'plainlinks'
:addClass(message('end-box-plainlinks'))
Line 769 ⟶ 757:
-- 'transcluded-from-blurb' -->
-- 'The above [[Wikipedia:Template documentation|documentation]]
-- is [[
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
Line 959 ⟶ 947:
)
return message('subpages-blurb', {subpagesLink})
end
|