Module:Documentation: Difference between revisions

Use TemplateStyles
No edit summary
Line 78: Line 78:
body
body
:addClass( badDoc and 'documentation-badDoc' or '' )
:addClass( badDoc and 'documentation-badDoc' or '' )
:css('background-color', '#' .. ( badDoc and '888888' or '33333333' ))
:tag( 'div' )
:tag( 'div' )
:attr( 'id', 'documentation-header-tools' )
:attr( 'id', 'documentation-header-tools' )
Line 145: Line 144:
local docClass = ''
local docClass = ''
local colour = '00000000'
local message
local message
local category
local category
if noDoc then
if noDoc then
docClass = 'documentation-noDoc'
docClass = 'documentation-noDoc'
colour = '33333333'
message = "'''This " .. pageType .. " has no documentation. " ..
message = "'''This " .. pageType .. " has no documentation. " ..
"If you know how to use this " .. pageType .. ", please create it.'''"
"If you know how to use this " .. pageType .. ", please create it.'''"
Line 161: Line 158:
elseif badDoc then
elseif badDoc then
docClass = 'documentation-badDoc'
docClass = 'documentation-badDoc'
colour = 'F9F2EA'
message = "'''This " .. pageType .. "'s documentation needs improving or additional information.'''\n"
message = "'''This " .. pageType .. "'s documentation needs improving or additional information.'''\n"
if not ( args.nocat or namespace == 'User' ) then
if not ( args.nocat or namespace == 'User' ) then
Line 190: Line 186:
body
body
:addClass( docClass )
:addClass( docClass )
:css('background-color', '#' .. colour)
local header = mw.html.create( 'div' )
local header = mw.html.create( 'div' )