Module:Routelist row: Difference between revisions

Content deleted Content added
m Protected Module:Routelist row: Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))
Add decommission override feature
Line 9:
]]--
routeStates.current = {row = "|-", removed = "current"} -- Data for current routes
routeStates.future = {row = '|- style="background-color:#ffdead;" title="Future route"', established = "proposed", removed = ""} -- Data for future routes
routeStates.former = {row = '|- style="background-color:#d3d3d3;" title="Former route"'} -- Data for former routes
routeStates.formeroverride = {row = '|- style="background-color:#d3d3d3;" title="Former route"', removed = "—"} -- Data for routes marked as former by override
routeStates.unknown = {row = "|-", removed = "—"} -- Data for route with unknown status
 
Line 17 ⟶ 18:
It then returns the entry in the routeStates table corresponding to the status of the route.
]]--
if decommissioned ~== 'yes' then -- If the routedecommissioned isproperty decommissionedjust says "yes", then mark it must beas a former route and display default data.
return routeStates.formeroverride
elseif decommissioned ~= '' then -- If the route is decommissioned, then it must be a former route.
return routeStates.former
elseif established == '' then -- Without the establishment date, there is not enough information to determine the status of the route.