Editing Module:DocumentationGive feedback
Jump to navigation
Jump to search
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 41: | Line 41: | ||
if title.namespace == 10 then -- Template namespace | if title.namespace == 10 then -- Template namespace | ||
cats = '[[Category:Template documentation|' .. title.baseText .. ']]' | cats = '[[Category:Template documentation|' .. title.baseText .. ']]' | ||
ret2 = addDependencyList and dependencyList._main( | ret2 = addDependencyList and dependencyList._main() or '' | ||
elseif title.namespace == 116 then -- Calculator namespace | elseif title.namespace == 116 then -- Calculator namespace | ||
cats = '' | cats = '' | ||
ret2 = addDependencyList and dependencyList._main( | ret2 = addDependencyList and dependencyList._main() or '' | ||
elseif title.namespace == 828 then -- Module namespace | elseif title.namespace == 828 then -- Module namespace | ||
cats = '[[Category:Module documentation|' .. title.baseText .. ']]' | cats = '[[Category:Module documentation|' .. title.baseText .. ']]' | ||
ret2 = addDependencyList and dependencyList._main( | ret2 = addDependencyList and dependencyList._main() or '' | ||
else | else | ||
cats = '' | cats = '' | ||
| Line 58: | Line 58: | ||
-- template header | -- template header | ||
-- don't use mw.html as we aren't closing the main div tag | -- don't use mw.html as we aren't closing the main div tag | ||
ret1 = '<div class="documentation | ret1 = '<div class="documentation">' | ||
ret2 = mw.html.create( nil ) | ret2 = mw.html.create( nil ) | ||
:tag( 'div' ) | :tag( 'div' ) | ||
:addClass( 'doc | :addClass( 'doc-header' ) | ||
:tag( 'span' ) | :tag( 'span' ) | ||
:addClass( 'doc | :addClass( 'doc-title' ) | ||
:wikitext( string.format('%s documentation', onModule and 'Module' or 'Template') ) | :wikitext( string.format('%s documentation', onModule and 'Module' or 'Template') ) | ||
:done() | :done() | ||
:done() | :done() | ||
:tag( 'div' ) | :tag( 'div' ) | ||
:addClass( 'doc-transclusion | :addClass( 'doc-transclusion' ) | ||
:tag( 'span' ) | :tag( 'span' ) | ||
:addClass( 'documentation-documentation' ) | :addClass( 'documentation-documentation' ) | ||
| Line 75: | Line 75: | ||
:done() | :done() | ||
:tag( 'span' ) | :tag( 'span' ) | ||
:addClass( 'doc-editlinks | :addClass( 'doc-editlinks plainlinks' ) | ||
:wikitext( | :wikitext( | ||
'[[' .. tostring( mw.uri.fullUrl( page .. '/doc', {action='edit'} ) ) .. ' edit]] ' .. | '[[' .. tostring( mw.uri.fullUrl( page .. '/doc', {action='edit'} ) ) .. ' edit]] ' .. | ||
| Line 84: | Line 84: | ||
:done() | :done() | ||
ret3 = addDependencyList and dependencyList._main( | ret3 = addDependencyList and dependencyList._main() or '' | ||
return ret1 .. tostring( ret2 ) .. '<div class="documentation-content">' .. ret3 | return ret1 .. tostring( ret2 ) .. '<div class="documentation-content">' .. ret3 | ||