Implemented discussion link

main
Inga 🏳‍🌈 14 years ago
parent dc16f82a01
commit 3b02ae845e
  1. 2
      Builder/IISMainHandler/build.txt
  2. 9
      IISMainHandler/handlers/response/BoardAsThread.cs
  3. 41
      templates/Full/elems/PostInfo.xslt
  4. 32
      templates/Lite/elems/PostInfo.xslt

@ -34,7 +34,14 @@ namespace FLocal.IISHandler.handlers.response {
new XElement("currentLocation", board.exportToXmlSimpleWithParent(context)),
new XElement("boards", from subBoard in board.subBoards select subBoard.exportToXml(context, true)),
new XElement("posts",
from thread in threads select thread.firstPost.exportToXml(context, true),
from thread in threads select thread.firstPost.exportToXml(
context,
false,
new XElement(
"specific",
thread.exportToXml(context)
)
),
pageOuter.exportToXml(1, 5, 1)
)
};

@ -158,4 +158,45 @@
</xsl:if>
</xsl:template>
<xsl:template match="specific/thread">
<tr>
<td>
<font size="-1">
<a class="separate">
<xsl:attribute name="href">
<xsl:text>/Thread/</xsl:text>
<xsl:value-of select="id"/>
<xsl:text>/</xsl:text>
<xsl:if test="afterLastRead&lt;=lastPostId">
<xsl:text>p</xsl:text>
<xsl:value-of select="afterLastRead"/>
</xsl:if>
</xsl:attribute>
<xsl:choose>
<xsl:when test="totalPosts &gt; 1">
<xsl:text>Îáñóæäåíèå ýòîãî ñîîáùåíèÿ</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Íà÷àòü îáñóæäåíèå</xsl:text>
</xsl:otherwise>
</xsl:choose>
</a>
<xsl:if test="totalPosts &gt; 1">
<span class="separate"><xsl:value-of select="totalPosts"/></span>
<xsl:if test="totalNewPosts and totalNewPosts!='0'">
<a class="cup separate">
<xsl:if test="/root/session/sessionKey">
<xsl:attribute name="href">/do/MarkThreadAsRead/<xsl:value-of select="id"/>/p<xsl:value-of select="lastPostId"/>/</xsl:attribute>
</xsl:if>
<font class="new"><i>(<xsl:value-of select="totalNewPosts"/>)</i></font>
</a>
</xsl:if>
</xsl:if>
<br/>
<br/>
</font>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>

@ -64,4 +64,36 @@
<xsl:template match="specific/changeInfo">
</xsl:template>
<xsl:template match="specific/thread">
<xsl:choose>
<xsl:when test="afterLastRead&lt;=lastPostId">
<xsl:text>(*</xsl:text>
<xsl:value-of select="totalNewPosts"/>
<xsl:text>)</xsl:text>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
<a>
<xsl:attribute name="href">
<xsl:text>/Thread/</xsl:text>
<xsl:value-of select="id"/>
<xsl:text>/</xsl:text>
<xsl:if test="afterLastRead&lt;=lastPostId">
<xsl:text>p</xsl:text>
<xsl:value-of select="afterLastRead"/>
</xsl:if>
</xsl:attribute>
<xsl:choose>
<xsl:when test="totalPosts &gt; 1">
<xsl:text>Ž¡á㦤¥­¨¥ í⮣® á®®¡é¥­¨ï</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text><EFBFBD> ç âì ®¡á㦤¥­¨¥</xsl:text>
</xsl:otherwise>
</xsl:choose>
</a>
</xsl:template>
</xsl:stylesheet>
Loading…
Cancel
Save