Created
March 20, 2014 19:51
-
-
Save 23maverick23/9672371 to your computer and use it in GitHub Desktop.
NS: Milestone status icon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
GREEN:WorkComplete=100||Status=Completed | |
BLUE:WorkComplete<>100;StartDate>today | |
ORANGE:WorkComplete<>100;StartDate=today | |
RED:WorkComplete<>100;StartDate<today | |
@green:#afc437; | |
@blue:#428bca; | |
@orange:#f89406; | |
@red:#bf340f; | |
*/ | |
CASE | |
WHEN | |
({status} = 'Completed' OR ROUND({percentworkcomplete}*100, 1) = 100.0) | |
THEN | |
'<div style="height:15px;width:15px;display:block;margin:0 auto;border:1px solid #afc437;border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;background-color:#afc437;" title="Completed"></div>' | |
WHEN | |
(ROUND({percentworkcomplete}*100, 1) <> 100.0) AND (TO_DATE(TO_CHAR({startdate}, 'MM/DD/YYYY'), 'MM/DD/YYYY') - TO_DATE(TO_CHAR(SYSDATE, 'MM/DD/YYYY'), 'MM/DD/YYYY')) < 0 | |
THEN | |
'<div style="height:15px;width:15px;display:block;margin:0 auto;border:1px solid #bf340f;border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;background-color:#bf340f;" title="Overdue"></div>' | |
WHEN | |
(ROUND({percentworkcomplete}*100, 1) <> 100.0) AND (TO_DATE(TO_CHAR({startdate}, 'MM/DD/YYYY'), 'MM/DD/YYYY') - TO_DATE(TO_CHAR(SYSDATE, 'MM/DD/YYYY'), 'MM/DD/YYYY')) = 0 | |
THEN | |
'<div style="height:15px;width:15px;display:block;margin:0 auto;border:1px solid #f89406;border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;background-color:#f89406;" title="Due Today"></div>' | |
ELSE | |
'<div style="height:15px;width:15px;display:block;margin:0 auto;border:1px solid #428bca;border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;background-color:#428bca;" title="On Track"></div>' | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment