Slight refactoring in ThreadInfo

main
Inga 🏳‍🌈 14 years ago
parent 6b6f6b2393
commit 48f7f70bf7
  1. 2
      Builder/IISMainHandler/build.txt
  2. 6
      Common/dataobjects/Thread.cs
  3. 8
      templates/Full/elems/ThreadInfo.xslt
  4. 6
      templates/Lite/elems/ThreadInfo.xslt

@ -189,8 +189,7 @@ namespace FLocal.Common.dataobjects {
XElement result = new XElement("thread", XElement result = new XElement("thread",
new XElement("id", this.id), new XElement("id", this.id),
new XElement("firstPostId", this.firstPostId), new XElement("firstPost", this.firstPost.exportToXml(context)),
new XElement("topicstarter", this.topicstarter.exportToXmlForViewing(context)),
new XElement("title", this.title), new XElement("title", this.title),
new XElement("lastPostId", this.lastPostId), new XElement("lastPostId", this.lastPostId),
new XElement("lastPostDate", this.lastPostDate.ToXml()), new XElement("lastPostDate", this.lastPostDate.ToXml()),
@ -198,9 +197,6 @@ namespace FLocal.Common.dataobjects {
new XElement("isLocked", this.isLocked), new XElement("isLocked", this.isLocked),
new XElement("totalPosts", this.totalPosts), new XElement("totalPosts", this.totalPosts),
new XElement("totalViews", this.totalViews), new XElement("totalViews", this.totalViews),
new XElement("bodyShort", this.firstPost.bodyShort),
new XElement("layerId", this.firstPost.layerId),
new XElement("layerName", this.firstPost.layer.name),
context.formatTotalPosts(this.totalPosts) context.formatTotalPosts(this.totalPosts)
); );
if(context.account != null) { if(context.account != null) {

@ -12,7 +12,7 @@
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
<td align="left"> <td align="left">
<xsl:attribute name="title"><xsl:value-of select="bodyShort"/></xsl:attribute> <xsl:attribute name="title"><xsl:value-of select="firstPost/post/bodyShort"/></xsl:attribute>
<xsl:if test="isAnnouncement='true'"> <xsl:if test="isAnnouncement='true'">
<img src="/static/images/sticky.gif" width="16" height="16" alt="" border="0" style="vertical-align: text-bottom;" /> <img src="/static/images/sticky.gif" width="16" height="16" alt="" border="0" style="vertical-align: text-bottom;" />
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
@ -24,10 +24,10 @@
<img alt="*" hspace="5" style="vertical-align: text-bottom"> <img alt="*" hspace="5" style="vertical-align: text-bottom">
<xsl:choose> <xsl:choose>
<xsl:when test="afterLastRead&lt;=lastPostId"> <xsl:when test="afterLastRead&lt;=lastPostId">
<xsl:attribute name="src">/static/images/message-<xsl:value-of select="layerName"/>-notread.gif</xsl:attribute> <xsl:attribute name="src">/static/images/message-<xsl:value-of select="firstPost/post/layerName"/>-notread.gif</xsl:attribute>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:attribute name="src">/static/images/message-<xsl:value-of select="layerName"/>-read.gif</xsl:attribute> <xsl:attribute name="src">/static/images/message-<xsl:value-of select="firstPost/post/layerName"/>-read.gif</xsl:attribute>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</img> </img>
@ -53,7 +53,7 @@
</xsl:if> </xsl:if>
</td> </td>
<td align="left" nowrap="nowrap"> <td align="left" nowrap="nowrap">
<xsl:apply-templates select="topicstarter/user" mode="userLink"/> <xsl:apply-templates select="firstPost/post/poster/user" mode="userLink"/>
</td> </td>
<td align="center"> <td align="center">
<xsl:value-of select="totalViews"/> <xsl:value-of select="totalViews"/>

@ -18,8 +18,8 @@
<xsl:if test="isLocked='true'"> <xsl:if test="isLocked='true'">
<xsl:text>{l}</xsl:text> <xsl:text>{l}</xsl:text>
</xsl:if> </xsl:if>
<xsl:if test="layerName='offtop'">{o}</xsl:if> <xsl:if test="firstPost/post/layerName='offtop'">{o}</xsl:if>
<xsl:if test="layerName='garbage'">{g}</xsl:if> <xsl:if test="firstPost/post/layerName='garbage'">{g}</xsl:if>
<xsl:choose> <xsl:choose>
<xsl:when test="afterLastRead&lt;=lastPostId"> <xsl:when test="afterLastRead&lt;=lastPostId">
<xsl:text>(*</xsl:text> <xsl:text>(*</xsl:text>
@ -44,7 +44,7 @@
</a> </a>
</td> </td>
<td align="left" nowrap="nowrap"> <td align="left" nowrap="nowrap">
<xsl:apply-templates select="topicstarter/user" mode="userLink"/> <xsl:apply-templates select="firstPost/post/poster/user" mode="userLink"/>
</td> </td>
</tr> </tr>
</xsl:template> </xsl:template>

Loading…
Cancel
Save