--[[本模块之全部或部分原来自地球联合百科的Module:Roadmap,依 CC BY-NC-SA 3.0 CN 授权引入。
经过双方编者的修改,本模块可能已与来源有很大差异。
]]--
local getArgs = require('Module:Arguments').getArgs
local p = {}
function p.main(frame)
local args = getArgs(frame)
return p._main(args, frame)
end
function p._main(args, frame)
local roadmap = mw.html.create('div'):addClass('roadmap right-float') --外层
roadmap
:tag('div')
:addClass('roadmap-name')
:wikitext(args['name'])
local i = 1
while true do
if args['procedure' .. i] == nil and args['status' .. i] == nil then
break
end
if args['procedure' .. i] then
if args['status' .. i] == "s" then
roadmap
:tag('div')
:addClass('roadmap-status-s')
:wikitext("✔ "..args['procedure' .. i].."<br/>")
elseif args['status' .. i] == "p" then
roadmap
:tag('div')
:addClass('roadmap-status-p')
:wikitext("➡ "..args['procedure' .. i].."<br/>")
elseif args['status' .. i] == "q" then
roadmap
:tag('div')
:wikitext("- "..args['procedure' .. i].."<br/>")
end
end
i = i + 1
end
return roadmap
end
return p