Module:Documentation: Difference between revisions

Detect testing pages
i18n
Line 85: Line 85:
:tag( 'div' )
:tag( 'div' )
:css( 'float', 'right' )
:css( 'float', 'right' )
:wikitext( '[[', page:fullUrl( 'action=purge' ), ' purge]]' )
:wikitext( '[[', page:fullUrl( 'action=purge' ), ' ' .. f:preprocess('{{lc:{{int:purge}}}}') .. ']]' )
:done()
:done()
:wikitext(
:wikitext(
Line 147: Line 147:
end
end
local action = 'edit'
local action = f:preprocess('{{lc:{{int:edit}}}}')
local preload = ''
local preload = ''
local colour = 'EAF4F9'
local colour = 'EAF4F9'
Line 153: Line 153:
local category
local category
if noDoc then
if noDoc then
action = 'create'
action = f:preprocess('{{lc:{{int:create}}}}')
preload = '&preload=Template:Documentation/preload'
preload = '&preload=Template:Documentation/preload'
colour = 'F9EAEA'
colour = 'F9EAEA'
Line 177: Line 177:
local links = {
local links = {
'[' .. docPage:fullUrl( 'action=edit' .. preload ) .. ' ' .. action .. ']',
'[' .. docPage:fullUrl( 'action=edit' .. preload ) .. ' ' .. action .. ']',
'[' .. docPage:fullUrl( 'action=history' ) .. ' history]',
'[' .. docPage:fullUrl( 'action=history' ) .. ' ' .. f:preprocess('{{lc:{{int:history short}}}}') .. ']',
'[' .. page:fullUrl( 'action=purge' ) .. ' purge]'
'[' .. page:fullUrl( 'action=purge' ) .. ' ' .. f:preprocess('{{lc:{{int:purge}}}}') .. ']'
}
}
if not noDoc and page ~= docPage then
if not noDoc and page ~= docPage then
table.insert( links, 1, '[[' .. docPage.fullText .. '|view]]' )
table.insert( links, 1, '[[' .. docPage.fullText .. '|' .. f:preprocess('{{lc:{{int:view}}}}') .. ']]' )
end
end
links = mw.html.create( 'span' )
links = mw.html.create( 'span' )