Boards/threads navigation improved

main
Inga 🏳‍🌈 14 years ago
parent 8447dedd52
commit 7c9ddf8033
  1. 2
      Builder/IISMainHandler/build.txt
  2. 1
      Common/dataobjects/Thread.cs
  3. 8
      templates/Full/Post.xslt
  4. 8
      templates/Full/Thread.xslt
  5. 15
      templates/Full/elems/BoardHeader.xslt
  6. 27
      templates/Full/elems/ForumHeader.xslt
  7. 3
      templates/Full/elems/Header.xslt

@ -184,6 +184,7 @@ namespace FLocal.Common.dataobjects {
return new XElement("thread", return new XElement("thread",
new XElement("id", this.id), new XElement("id", this.id),
new XElement("name", this.title), new XElement("name", this.title),
new XElement("nameTranslit", this.titleTranslit),
new XElement("parent", this.board.exportToXmlSimpleWithParent(context)) new XElement("parent", this.board.exportToXmlSimpleWithParent(context))
); );
} }

@ -7,10 +7,10 @@
</xsl:template> </xsl:template>
<xsl:template name="isLiteEnabled">true</xsl:template> <xsl:template name="isLiteEnabled">true</xsl:template>
<xsl:template name="specific"> <xsl:template name="specific">
<xsl:if test="not(get/param[@name='headers'] = 'false')"> <!--xsl:if test="not(get/param[@name='headers'] = 'false')">
<xsl:call-template name="threadInfo"/> <xsl:call-template name="threadInfo"/>
</xsl:if> </xsl:if>
<br /> <br /-->
<table width="95%" align="center" cellpadding="1" cellspacing="1" class="tablesurround"> <table width="95%" align="center" cellpadding="1" cellspacing="1" class="tablesurround">
<tr> <tr>
<td> <td>
@ -22,10 +22,10 @@
</td> </td>
</tr> </tr>
</table> </table>
<br /> <!--br />
<xsl:if test="not(get/param[@name='headers'] = 'false')"> <xsl:if test="not(get/param[@name='headers'] = 'false')">
<xsl:call-template name="threadInfo"/> <xsl:call-template name="threadInfo"/>
</xsl:if> </xsl:if-->
</xsl:template> </xsl:template>
<xsl:template name="threadInfo"> <xsl:template name="threadInfo">

@ -9,10 +9,10 @@
<xsl:template name="isRssEnabled">true</xsl:template> <xsl:template name="isRssEnabled">true</xsl:template>
<xsl:template name="rssRelativeLink"><xsl:value-of select="/root/currentBaseUrl"/>0-reversed</xsl:template> <xsl:template name="rssRelativeLink"><xsl:value-of select="/root/currentBaseUrl"/>0-reversed</xsl:template>
<xsl:template name="specific"> <xsl:template name="specific">
<xsl:if test="not(get/param[@name='headers'] = 'false')"> <!--xsl:if test="not(get/param[@name='headers'] = 'false')">
<xsl:call-template name="threadInfo"/> <xsl:call-template name="threadInfo"/>
</xsl:if> </xsl:if>
<br /> <br /-->
<table width="95%" align="center" cellpadding="1" cellspacing="1" class="tablesurround"> <table width="95%" align="center" cellpadding="1" cellspacing="1" class="tablesurround">
<tr> <tr>
<td> <td>
@ -48,10 +48,10 @@
</td> </td>
</tr> </tr>
</table> </table>
<br /> <!--br />
<xsl:if test="not(get/param[@name='headers'] = 'false')"> <xsl:if test="not(get/param[@name='headers'] = 'false')">
<xsl:call-template name="threadInfo"/> <xsl:call-template name="threadInfo"/>
</xsl:if> </xsl:if-->
</xsl:template> </xsl:template>
<xsl:template name="threadInfo"> <xsl:template name="threadInfo">

@ -2,7 +2,7 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:template name="boardHeader"> <xsl:template name="boardHeader">
<xsl:variable name="baseLink">/Forum/Board/<xsl:value-of select="currentLocation/board/id"/>-<xsl:value-of select="currentLocation/board/nameTranslit"/>/</xsl:variable> <xsl:variable name="baseLink">/Forum/Board/<xsl:value-of select="currentLocation//board[not(name(../..)='board')]/id"/>-<xsl:value-of select="currentLocation//board[not(name(../..)='board')]/nameTranslit"/>/</xsl:variable>
<table width="95%" align="center" class="tablesurround" cellpadding="1" cellspacing="1"> <table width="95%" align="center" class="tablesurround" cellpadding="1" cellspacing="1">
<tr> <tr>
<td> <td>
@ -23,6 +23,19 @@
<xsl:with-param name="url"><xsl:value-of select="$baseLink"/>NewThread/</xsl:with-param> <xsl:with-param name="url"><xsl:value-of select="$baseLink"/>NewThread/</xsl:with-param>
<xsl:with-param name="text">Íîâàÿ òåìà</xsl:with-param> <xsl:with-param name="text">Íîâàÿ òåìà</xsl:with-param>
</xsl:call-template> </xsl:call-template>
<xsl:if test="currentLocation//thread">
<xsl:text> | </xsl:text>
<xsl:call-template name="headerLink">
<xsl:with-param name="url"><xsl:value-of select="$baseLink"/>Thread/<xsl:value-of select="currentLocation//thread/id"/>-<xsl:value-of select="currentLocation//thread/nameTranslit"/>/</xsl:with-param>
<xsl:with-param name="postfix">
<xsl:if test="currentLocation//post">
<xsl:text>Posts/p</xsl:text>
<xsl:value-of select="currentLocation//post/id"/>
</xsl:if>
</xsl:with-param>
<xsl:with-param name="text"><xsl:value-of select="substring(currentLocation//thread/name, 1, 30)"/></xsl:with-param>
</xsl:call-template>
</xsl:if>
</td> </td>
</tr> </tr>
</table> </table>

@ -32,12 +32,9 @@
<xsl:if test="not(session/sessionKey)">true</xsl:if> <xsl:if test="not(session/sessionKey)">true</xsl:if>
</xsl:with-param> </xsl:with-param>
</xsl:call-template> </xsl:call-template>
<xsl:if test="currentLocation//board"> <xsl:if test="currentLocation//board[not(name(../..)='board')]">
<xsl:text> | </xsl:text> <xsl:text> | </xsl:text>
<xsl:call-template name="headerLink"> <xsl:apply-templates select="currentLocation//board[not(name(../..)='board')]" mode="headerBoardLink"/>
<xsl:with-param name="url">/Forum/Board/<xsl:value-of select="currentLocation//board/id"/>-<xsl:value-of select="currentLocation//board/nameTranslit"/>/</xsl:with-param>
<xsl:with-param name="text"><xsl:value-of select="currentLocation//board/name"/></xsl:with-param>
</xsl:call-template>
</xsl:if> </xsl:if>
</td> </td>
</tr> </tr>
@ -45,9 +42,27 @@
</td> </td>
</tr> </tr>
</table> </table>
<xsl:if test="currentLocation/board"> <xsl:if test="currentLocation//board">
<xsl:call-template name="boardHeader"/> <xsl:call-template name="boardHeader"/>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="board" mode="headerParentBoardLink">
<xsl:apply-templates select="parent/board" mode="headerParentBoardLink"/>
<xsl:call-template name="headerLink">
<xsl:with-param name="url">/Forum/Board/<xsl:value-of select="id"/>-<xsl:value-of select="nameTranslit"/>/</xsl:with-param>
<xsl:with-param name="text"><xsl:value-of select="substring(name, 1, 1)"/></xsl:with-param>
</xsl:call-template>
<xsl:text> &#8594; </xsl:text>
</xsl:template>
<xsl:template match="board" mode="headerBoardLink">
<xsl:apply-templates select="parent/board" mode="headerParentBoardLink"/>
<xsl:call-template name="headerLink">
<xsl:with-param name="url">/Forum/Board/<xsl:value-of select="id"/>-<xsl:value-of select="nameTranslit"/>/</xsl:with-param>
<xsl:with-param name="text"><xsl:value-of select="name"/></xsl:with-param>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

@ -13,9 +13,10 @@
<xsl:param name="url"/> <xsl:param name="url"/>
<xsl:param name="text"/> <xsl:param name="text"/>
<xsl:param name="isDisabled"/> <xsl:param name="isDisabled"/>
<xsl:param name="postfix"/>
<a target="_top"> <a target="_top">
<xsl:if test="not($isDisabled='true')"> <xsl:if test="not($isDisabled='true')">
<xsl:attribute name="href"><xsl:value-of select="$url"/>?<xsl:value-of select="current/date/ticks"/></xsl:attribute> <xsl:attribute name="href"><xsl:value-of select="$url"/><xsl:value-of select="$postfix"/>?<xsl:value-of select="current/date/ticks"/></xsl:attribute>
</xsl:if> </xsl:if>
<xsl:if test="starts-with(/root/currentUrl, $url)"> <xsl:if test="starts-with(/root/currentUrl, $url)">
<xsl:attribute name="class">currentLink</xsl:attribute> <xsl:attribute name="class">currentLink</xsl:attribute>

Loading…
Cancel
Save