require('strict')
local arguments = require("Module:Arguments")
local messageBox = require("Module:Message box")
local mRedirect = require('Module:Redirect')
-- text
local createdText = "This article, '''$1''', has recently been created via the [[Wikipedia:Articles for creation|Articles for creation process]]. Please check to see if the reviewer has accidentally left this template after accepting the draft and [[Template:AfC_submission/created#What to do if you see this template|take appropriate action]] as necessary."
local reviewingText = "'''Review in progress.'''"
local draftText = "'''Draft article not currently submitted for review.'''"
local rejectedText = "'''Submission rejected'''"
local declinedText = "'''Submission declined'''"
local pendingText = "'''Review waiting, please be patient.'''"
local p = {}
function p._main(args, frame)
local box
local title = mw.title.getCurrentTitle()
if title.namespace == 0 then -- created
box = messageBox.main("ambox", {name = "AfC submission", type = "notice", image = "[[File:AFC-Logo.svg|50px|link=|alt=]]", text = createdText})
elseif args[1] == "R" then -- reviewing
box = messageBox.main("ombox", {
name = "AfC submission",
type = "notice",
image = "[[File:AFC-Logo Pending.svg|75px|link=|alt=]]",
imageright = "[[File:Ambox clock.svg|75px|link=|alt=]]",
style = "background-color: #b1dae8;",
textstyle = "CSS values",
text = reviewingText
})
elseif args[1] == "T" then -- draft
box = messageBox.main("ombox", {
type = "notice",
image = "[[File:AFC-Logo Hold.svg|75px|link=|alt=]]",
style = "background-color: #eaebe4;",
textstyle = "CSS values",
text = draftText
})
elseif args[1] == "D" and args["reject"] ~= nil then -- rejected
box = messageBox.main("ombox", {
type = "notice",
image = "none",
imageright = "[[File:Dialog-STOP.svg|60px|link=|alt=]]",
style = "background-color: #FEE;",
text = rejectedText
})
elseif args[1] == "D" then -- delcined
box = messageBox.main("ombox", {
type = "notice",
image = "none",
imageright = "[[File:AFC-Logo_Decline.svg|75px|link=|alt=]]",
style = "background-color: #FEE",
text = declinedText
})
else -- "pending"
box = messageBox.main("ombox", {
type = "notice",
image = "[[File:AFC-Logo.svg|75px|link=|alt=]]",
style = "background-color: #f3eba3;",
text = pendingText
})
end
return box
end
function p.main(frame)
local args = arguments.getArgs(frame)
return p._main(args, frame)
end
return p