Last edited 2 years ago
by Anonymous user

SocialEntity:4 and Module:IndicatorProcess: Difference between pages

(Difference between pages)
No edit summary
 
m (1 revision imported)
 
Line 1: Line 1:
{
local p = {} -- p stands for package
     "wikipageid": 14,
 
     "namespace": 0,
function p.forDate( frame )
     "titletext": "Property:Owl:differentFrom",
     local todayU = frame:callParserFunction( '#time:U' )
     "description": "",
     local soonU = frame:callParserFunction( '#time:U', '+2 months' )
     "parentid": 0,
     local timeU = frame:callParserFunction( '#time:U', frame.args[1] )
     "id": 4,
     local color = 'green'
     "ownerid": 3,
    if ( timeU < soonU ) then
     "type": "wikipage",
    color = 'orange'
    "archived": false,
     end
     "tags": [
     if ( timeU < todayU ) then
        "Property:Owl:differentFrom"
    color = 'red'
    ],
     end
    "resolved": false
     return p.getIndicator( frame, color )
}
end
 
function p.getIndicator( frame, color )
-- adding the color in hidden text makes the indicator sortable in tables
     return "<span class='date-indicator' style='color: " .. color .. ";font-size:1em;'>&#9673;<span style='display:none;'>" .. color .. "</span></span>";
end
 
return p

Latest revision as of 16:44, 1 December 2021

No content


local p = {} -- p stands for package

function p.forDate( frame )
    local todayU = frame:callParserFunction( '#time:U' )
    local soonU = frame:callParserFunction( '#time:U', '+2 months' )
    local timeU = frame:callParserFunction( '#time:U', frame.args[1] )
    local color = 'green'
    if ( timeU < soonU ) then
    	color = 'orange'
    end
    if ( timeU < todayU ) then
    	color = 'red'
    end
    return p.getIndicator( frame, color )
end

function p.getIndicator( frame, color )
	-- adding the color in hidden text makes the indicator sortable in tables
    return "<span class='date-indicator' style='color: " .. color .. ";font-size:1em;'>&#9673;<span style='display:none;'>" .. color .. "</span></span>";
end

return p
No categories assignedEdit