Conditional formatting
I am looking for some help!
I have been tasked to create a master list of documents and on this master list of documents I need to apply some conditional formatting. The formatting needed is when a document has past its review date show some indicaition that it has past its review date in my case I have creaed a red green and amber image similar to a KPI indicator and when it is nearing its review date show a different indicator otherwise show an indicator that the document is the current version.
This is what I I have so far:
<xsl:choose>
<xsl:when test="number(translate(substring-before(@Review_x0020_Date,'T'),'-','')-30) > number(translate(substring-before($Today,'T'),'-',''))">
<IMG SRC="http://ross-works/Path Demo/Images1/green_orb.jpg" ALT="{@Status}" />
</xsl:when>
<xsl:when test="number(translate(substring-before(@Review_x0020_Date,'T'),'-','')) <= number(translate(substring-before($Today,'T'),'-',''))">
<IMG SRC="http://ross-works/Path Demo/Images1/red_orb.jpg" ALT="{@Status}" />
</xsl:when>
</xsl:choose>
The code snipet is part of a dataview that pulls docs from a linked source. In this case two document libraries. And this works fine has the review date passes the image changes to show that the reveiw date has past, but I need to take this further, what I need to achieve is an intermidate scenario where if the review date in within on month of expiration that show a different indicator to the user that the review date is approaching.
I know this is a sizebale thread but I feel I need to offer as much explanition as possible.
Can anyone help?
Thanks
|