Module:Documentation: Difference between revisions

i18n
No edit summary
Line 77: Line 77:
local body = mw.html.create( 'div' ):addClass( 'documentation-header' )
local body = mw.html.create( 'div' ):addClass( 'documentation-header' )
body
body
:addClass( badDoc and 'documentation-badDoc' or '' )
:css{
:css{
['margin-bottom'] = '0.8em',
['margin-bottom'] = '0.8em',
Line 149: Line 150:
local action = f:preprocess('{{lc:{{int:edit}}}}')
local action = f:preprocess('{{lc:{{int:edit}}}}')
local preload = ''
local preload = ''
local docClass = ''
local colour = 'EAF4F9'
local colour = 'EAF4F9'
local message
local message
Line 155: Line 157:
action = f:preprocess('{{lc:{{int:create}}}}')
action = f:preprocess('{{lc:{{int:create}}}}')
preload = '&preload=Template:Documentation/preload'
preload = '&preload=Template:Documentation/preload'
docClass = 'documentation-noDoc'
colour = 'F9EAEA'
colour = 'F9EAEA'
message = "'''This " .. pageType .. " has no documentation. " ..
message = "'''This " .. pageType .. " has no documentation. " ..
Line 165: Line 168:
end
end
elseif badDoc then
elseif badDoc then
docClass = 'documentation-badDoc'
colour = 'F9F2EA'
colour = 'F9F2EA'
message = "'''This " .. pageType .. "'s documentation needs improving or additional information.'''\n"
message = "'''This " .. pageType .. "'s documentation needs improving or additional information.'''\n"
Line 188: Line 192:
local body = mw.html.create( 'div' ):addClass( 'documentation' )
local body = mw.html.create( 'div' ):addClass( 'documentation' )
body:css{
body
:addClass( docClass )
:css{
['background-color'] = '#' .. colour,
['background-color'] = '#' .. colour,
border = '1px solid #AAA',
border = '1px solid #AAA',