In my custom XSLT file, I am able to modify a choice field to swap the text for icons.
My choice looks like this; it just checks for the column header name and for the number in parenthesis, then it adds my html. The icons are set via CSS:
(1) Confirmed
(2) Waiting
(3) Unconfirmed
This works in a regular list view, but not in the GANTT view.
<!-- Convert the Fields into a status icons -->
<xsl:template match="FieldRef[@Name='Confirmation_x0020_Status']" mode="body">
<xsl:param name="thisNode" select="."/>
<xsl:variable name="currentValue" select="$thisNode/@Confirmation_x0020_Status" />
<xsl:variable name="statusRating1">(1)</xsl:variable>
<xsl:variable name="statusRating2">(2)</xsl:variable>
<xsl:variable name="statusRating3">(3)</xsl:variable>
<xsl:choose>
<xsl:when test="contains($currentValue, $statusRating1)">
<span class="statusRatingX statusRating1"></span>
</xsl:when>
<xsl:when test="contains($currentValue, $statusRating2)">
<span class="statusRatingX statusRating2"></span>
</xsl:when>
<xsl:when test="contains($currentValue, $statusRating3)">
<span class="statusRatingX statusRating3"></span>
</xsl:when>
<xsl:otherwise>
<span class="statusRatingN"><xsl:value-of select="$currentValue" /></span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
I've gotten this far by making a copy of c:\program files\common files\microsoft shared\web server extensions\14\TEMPLATE\LAYOUTS\XSL\fldtypes.xsl
and adding the above snippet to the copy and placing the copy in that same directory. It works on regular lists quite well.
So how do I make this XSLT work in GANTT view?
[edit]
Has anyone ever even tried to use icons in GANTT view? Does anyone have an idea why this doesn't work?