Module:Routelist row: Difference between revisions

Content deleted Content added
halle-frickin-lujah it finally works
Allowing future row color
Line 1:
local p = {
mw = require("Module:mw"),
lang = mw.getContentLanguage()
}
 
function p.rowcolor(frame)
Line 8 ⟶ 11:
local decommissioned = frame.args[2]
 
-- if 1 == 1 then --p.lang:FormatDateformatDate('Y-m-d') < established then --this is a future route
-- return "|- style=\"background-color:#ffdead;\" title=\"Future route\"|fut|\n"
ifelseif decommissioned ~= '0' then --this is a decommissioned route
-- elseif
return '|- style=\"background-color:#d3d3d3;\" title=\"Former route\"\n'
if decommissioned ~= '0' then --this is a decommissioned route
else --this is a normal route
return '|- style=\"background-color:#d3d3d3;\" title=\"Former route\"\n'
else --this isreturn a normal'|- route\n'
end
return '|- \n'
end
end