Forum navigation improved

main
Inga 🏳‍🌈 14 years ago
parent a2ce385705
commit 354dcf497f
  1. 2
      Builder/IISMainHandler/build.txt
  2. 1
      IISMainHandler/handlers/response/CreateThreadHandler.cs
  3. 85
      templates/Full/Board.xslt
  4. 34
      templates/Full/elems/BoardHeader.xslt
  5. 53
      templates/Full/elems/ForumHeader.xslt
  6. 8
      templates/Full/elems/Header.xslt

@ -22,6 +22,7 @@ namespace FLocal.IISHandler.handlers.response {
Board board = this.url.board;
return new XElement[] {
new XElement("currentLocation", board.exportToXmlSimpleWithParent(context)),
board.exportToXml(context, Board.SubboardsOptions.None),
board.exportLayersInfoForUser(context),
};

@ -9,91 +9,6 @@
<xsl:template name="isLiteEnabled">true</xsl:template>
<xsl:template name="isRssEnabled">true</xsl:template>
<xsl:template name="specific">
<table width="95%" align="center" cellpadding="1" cellspacing="1" class="tablesurround">
<tr>
<td>
<table cellpadding="3" cellspacing="1" width="100%" border="0" class="tableborders">
<tr class="darktable">
<td colspan="6">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" class="catandforum">
<xsl:apply-templates select="currentLocation" mode="breadcrumbs"/>
</td>
<td align="right" valign="bottom">
<table border="0" class="tablesurround">
<tr>
<td class="navigation" nowrap="nowrap">
<!-- postoption is either newpost.gif or greynewpost.gif -->
<a>
<xsl:if test="session/sessionKey">
<xsl:attribute name="href">/Board/<xsl:value-of select="currentLocation/board/id"/>/NewThread/</xsl:attribute>
</xsl:if>
<img src="/static/images/newpost.gif" alt="Íîâîå ñîîáùåíèå" border="0" width="13" height="15" style="vertical-align: text-bottom" />
<xsl:text>Ñîîáùåíèå</xsl:text>
</a>
</td>
<td class="navigation" nowrap="nowrap">
<form method="get" action="" name="fullview">
<select name="fullview" class="formboxes" style="font-size:10px">
<option value="0">Íîðì</option>
<option value="1">Îôò</option>
<option value="2" selected="selected">Ìóñ</option>
</select>
</form>
</td>
<td class="navigation" nowrap="nowrap">
<!-- prevoption is either previous.gif or greyprevious.gif -->
<a>
<img alt="Ïðåäûäóùàÿ ñòðàíèöà" border="0" width="12" height="15" style="vertical-align: text-bottom">
<xsl:attribute name="src">/static/images/greyprevious.gif</xsl:attribute>
</img>
<xsl:text>Ïðåä.</xsl:text>
</a>
</td>
<td class="navigation" nowrap="nowrap">
<a>
<img src="/static/images/all.gif" alt="Ñïèñîê ôîðóìîâ" border="0" width="19" height="15" style="vertical-align: text-bottom" />
<xsl:text>Ñïèñîê</xsl:text>
</a>
</td>
<td class="navigation" nowrap="nowrap">
<!-- nextoption is either next.gif or greynext.gif -->
<a>
<img alt="Ñëåäóþùàÿ ñòðàíèöà" border="0" width="14" height="15" style="vertical-align: text-bottom">
<xsl:attribute name="src">/static/images/next.gif</xsl:attribute>
</img>
<xsl:text>Ñëåä.</xsl:text>
</a>
</td>
<td class="navigation">
<a>
<img src="/static/images/lb.gif" border="0" alt="Ïðî÷èòàòü âñ¸" style="vertical-align: text-bottom" />
</a>
</td>
<td class="navigation">
<a>
<xsl:text>Êàê ðàçäåë</xsl:text>
</a>
</td>
<td class="navigation">
<a>
<xsl:attribute name="href">/BoardAsThread/<xsl:value-of select="currentLocation/board/id"/>/</xsl:attribute>
<xsl:text>Êàê òðåä</xsl:text>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
<xsl:if test="boards/board">
<table width="95%" align="center" class="tableborders" border="1">
<tr>

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="Windows-1251"?>
<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:variable name="baseLink">/Forum/Board/<xsl:value-of select="currentLocation/board/id"/>/</xsl:variable>
<table width="95%" align="center" class="tablesurround" cellpadding="1" cellspacing="1">
<tr>
<td>
<table width="100%" class="tableborders" cellpadding="3" cellspacing="1">
<tr>
<td align="center" class="menubar">
<xsl:call-template name="headerLink">
<xsl:with-param name="url"><xsl:value-of select="$baseLink"/>Threads/</xsl:with-param>
<xsl:with-param name="text">Òåìû</xsl:with-param>
</xsl:call-template>
<xsl:text> | </xsl:text>
<xsl:call-template name="headerLink">
<xsl:with-param name="url"><xsl:value-of select="$baseLink"/>Headlines/</xsl:with-param>
<xsl:with-param name="text">Çàãëàâíûå ñîîáùåíèÿ</xsl:with-param>
</xsl:call-template>
<xsl:text> | </xsl:text>
<xsl:call-template name="headerLink">
<xsl:with-param name="url"><xsl:value-of select="$baseLink"/>NewThread/</xsl:with-param>
<xsl:with-param name="text">Íîâàÿ òåìà</xsl:with-param>
</xsl:call-template>
</td>
</tr>
</table>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="Windows-1251"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:import href="BoardHeader.xslt"/>
<xsl:template name="forumHeader">
<table width="95%" align="center" class="tablesurround" cellpadding="1" cellspacing="1">
<tr>
<td>
<table width="100%" class="tableborders" cellpadding="3" cellspacing="1">
<tr>
<td align="center" class="menubar">
<xsl:call-template name="headerLink">
<xsl:with-param name="url">/Forum/Boards/</xsl:with-param>
<xsl:with-param name="text">Ñïèñîê ðàçäåëîâ</xsl:with-param>
</xsl:call-template>
<xsl:text> | </xsl:text>
<xsl:call-template name="headerLink">
<xsl:with-param name="url">/Forum/AllThreads/</xsl:with-param>
<xsl:with-param name="text">Ïîñëåäíèå òåìû</xsl:with-param>
</xsl:call-template>
<xsl:text> | </xsl:text>
<xsl:call-template name="headerLink">
<xsl:with-param name="url">/Forum/AllPosts/</xsl:with-param>
<xsl:with-param name="text">Ïîñëåäíèå ñîîáùåíèÿ</xsl:with-param>
</xsl:call-template>
<xsl:text> | </xsl:text>
<img src="/static/images/shortcut.png" border="0"/>
<xsl:call-template name="headerLink">
<xsl:with-param name="url">/Users/User/<xsl:value-of select="session/user/id"/>/Replies/</xsl:with-param>
<xsl:with-param name="text">Îòâåòû ìíå</xsl:with-param>
<xsl:with-param name="isDisabled">
<xsl:if test="not(session/sessionKey)">true</xsl:if>
</xsl:with-param>
</xsl:call-template>
<xsl:if test="currentLocation//board">
<xsl:text> | </xsl:text>
<xsl:call-template name="headerLink">
<xsl:with-param name="url">/Forum/Board/<xsl:value-of select="currentLocation//board/id"/>/</xsl:with-param>
<xsl:with-param name="text"><xsl:value-of select="currentLocation//board/name"/></xsl:with-param>
</xsl:call-template>
</xsl:if>
</td>
</tr>
</table>
</td>
</tr>
</table>
<xsl:if test="currentLocation/board">
<xsl:call-template name="boardHeader"/>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="Windows-1251"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:import href="ForumHeader.xslt"/>
<xsl:import href="MyHeader.xslt"/>
<xsl:import href="UsersHeader.xslt"/>
<xsl:import href="UploadHeader.xslt"/>
@ -47,8 +48,8 @@
<xsl:text> | </xsl:text>
</xsl:if>
<xsl:call-template name="headerLink">
<xsl:with-param name="url">/Boards/</xsl:with-param>
<xsl:with-param name="text">Ñïèñîê ôîðóìîâ</xsl:with-param>
<xsl:with-param name="url">/Forum/</xsl:with-param>
<xsl:with-param name="text">Ôîðóì</xsl:with-param>
</xsl:call-template>
<xsl:text> | </xsl:text>
<xsl:call-template name="headerLink">
@ -147,6 +148,9 @@
</td>
</tr>
</table>
<xsl:if test="starts-with(/root/currentUrl, '/Forum/')">
<xsl:call-template name="forumHeader"/>
</xsl:if>
<xsl:if test="starts-with(/root/currentUrl, '/Users/')">
<xsl:call-template name="usersHeader"/>
</xsl:if>

Loading…
Cancel
Save