Jump to content

Module:Routelist row

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Scott5114 (talk | contribs) at 07:31, 26 February 2013 (For {{Routelist row}}). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

function rowcolor(established, decommissioned)
    --This function determines if this is a future route, present route, or decommissioned route, and colors the row appropriately.
    if established > lang.FormatDate('Y-m-d') then --this is a future route
        print "|style=\"background-color:#ffdead;" title="Future route\""
    elseif decommissioned ~= 0 then --this is a decommissioned route
        print "|style=\"background-color:#d3d3d3;\" title=\"Former route\""
    else --this is a normal route
        print "|"
    end
end