Se non sapete come abilitare il rating nelle vostre liste fate riferimento a questo link: http://office.microsoft.com/en-us/sharepoint-server-help/enable-users-to-rate-content-HA101791797.aspx#_Toc260488882
Per poterlo fare basta modificare l’xslt della web part dei risultati, aggiungendo il template:
<xsl:template name="stars">
<xsl:param name="starCount" />
<xsl:param name="value" select="1" />
<xsl:if test="$value <= $starCount">
<img src="/_Layouts/Images/RatingsNew.png"/>
<xsl:call-template name="stars">
<xsl:with-param name="starCount" select="$starCount"/>
<xsl:with-param name="value" select="$value + 1" />
xsl:call-template>
xsl:if>
xsl:template>
e poi richiamate il template dove meglio vi pare
<span style="display:block">
<xsl:choose>
<xsl:when test="rating > 0">
<xsl:attribute name="title">
<xsl:value-of select="rating" />
xsl:attribute>
<xsl:call-template name="stars">
<xsl:with-param name="starCount" select="rating" />
xsl:call-template>
<xsl:if test="round(rating) > rating">
<img src="/_Layouts/Images/RatingsNew.png"/>
xsl:if>
xsl:when>
<xsl:otherwise>
<b>Not Ratedb>
xsl:otherwise>
xsl:choose>
span>
that’s all
No comments:
Post a Comment