Difference between revisions of "Template:Urgency"

From 2value wiki 2
Jump to navigation Jump to search
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#switch: {{#expr: ( {{{1}}} / {{{2|#default=3}}}) round 0 }}
+
<!--
| -3 = red
+
Urgency: calculates the urgency of an action (current date versus Focalweek-Focalyear) and colorizes characters. We use symbols suchs as &hearts and &diams. The difference in weeks is chopped into blocks of weeks dependent of the total timespan of weeks.
| -2 = darksalmon
+
 
| -1 = salmon
+
Henk van Cann may 3th 2010: Urgency calculates the colors in weeks between the current date and the two arguments that are given
0 = white
+
{{{1}}} is the Due date in weeks
| 1 = lime
+
{{{2}}} is de current date in week before enddate, often resulting from WeekDiff call
| 2 = yellowgreen
+
{{{3}}} is the timespan in weeks that is considered
| 3 = green
+
 
 +
Be carefull the values 0.2 in this codesnippet is very important
 +
  {{#switch: {{InBand | {{{1}}}| {{{2}}}| {{{3}}}*0.2 }}
 +
The sequence in the switch statement below is crucial: the first match will be returned, which results in a outer-in evaluation of the possible Urgency-situation.
 +
 
 +
FORMAT: {{Urgency|<weeknumber>|<weeknumber>|<number of weeks>}}
 +
Valid Calls:
 +
{{Urgency|13|12|30}}
 +
-->
 +
{{#switch: {{InBand | {{{1}}}| {{{2}}}| {{{3}}}*0.2 }}  
 +
| late = red
 +
| early = green
 +
| inband = {{#switch: {{InBand | {{{1}}}| {{{2}}} | ({{{3}}}*0.1) }} | late = salmon | early = yellowgreen | inband = white }}
 
| #default = black
 
| #default = black
 
}}
 
}}

Latest revision as of 20:55, 3 May 2010

black