Difference between revisions of "Template:Urgency"
Jump to navigation
Jump to search
(Created page with '{{#switch: {{{1}}} | 9 = yellow | #default = black }}') |
|||
(24 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{#switch: {{{1}}} | + | <!-- |
− | | | + | 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. |
+ | |||
+ | Henk van Cann may 3th 2010: Urgency calculates the colors in weeks between the current date and the two arguments that are given | ||
+ | {{{1}}} is the Due date in weeks | ||
+ | {{{2}}} is de current date in week before enddate, often resulting from WeekDiff call | ||
+ | {{{3}}} is the timespan in weeks that is considered | ||
+ | |||
+ | 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