Revision: 55
http://picfinity.svn.sourceforge.net/picfinity/?rev=55&view=rev
Author: espadav8
Date: 2007-08-25 03:06:01 -0700 (Sat, 25 Aug 2007)
Log Message:
-----------
Show the comments for an image if any are passed in
Modified Paths:
--------------
trunk/.themes/db/db.xsl
Modified: trunk/.themes/db/db.xsl
===================================================================
--- trunk/.themes/db/db.xsl 2007-08-25 10:04:59 UTC (rev 54)
+++ trunk/.themes/db/db.xsl 2007-08-25 10:06:01 UTC (rev 55)
@@ -284,11 +284,6 @@
<a>
<xsl:attribute name="href">index.php?id=<xsl:value-of select="@id" /></xsl:attribute>
<xsl:text>Link to this image</xsl:text>
-<!--
- <img alt="Link to this image">
- <xsl:attribute name="src"><xsl:value-of select="concat('.themes/', $themename, '/link.png')" /></xsl:attribute>
- </img>
--->
</a>
</div>
<div id="expandedimagespan">
@@ -302,6 +297,12 @@
<div class="name"><xsl:value-of select="@file" /></div>
</div>
+ <xsl:if test="count(comment) > 0">
+ <div id="comments">
+ <xsl:apply-templates select="comment" />
+ </div>
+ </xsl:if>
+
<div id="selectedalbum">
<xsl:apply-templates select="parent::*/folder" />
<xsl:apply-templates select="parent::*/image">
@@ -312,6 +313,51 @@
</div>
</xsl:template>
+ <xsl:template match="comment">
+ <div class="comment">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">
+ <xsl:attribute name="class">comment odd</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="class">comment</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <span class="date"><xsl:value-of select="added" /></span>
+ <span class="name">
+ <xsl:choose>
+ <xsl:when test="email != ''">
+ <a>
+ <xsl:attribute name="href">mailto:<xsl:value-of select="email" /></xsl:attribute>
+ <xsl:value-of select="name" />
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="user_name" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+ <span class="web">
+ <xsl:choose>
+ <xsl:when test="www != ''">
+ <a>
+ <xsl:attribute name="href">http://<xsl:value-of select="www" /></xsl:attribute>
+ <xsl:value-of select="www" />
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+ <span class="commenttext">
+ <xsl:value-of select="comment_text" />
+ </span>
+ <span class="rating">
+ <xsl:value-of select="rating" />
+ </span>
+ </div>
+ </xsl:template>
+
<xsl:template match="folder" mode="getpath">
<xsl:value-of select="concat(@name, '/')" />
</xsl:template>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|