Slight PageOuter refactoring

main
Inga 🏳‍🌈 13 years ago
parent ed0dbd29b5
commit e6e7a52b8f
  1. 12
      templates/Modern/AllPosts.xslt
  2. 12
      templates/Modern/AllThreads.xslt
  3. 12
      templates/Modern/Board.xslt
  4. 12
      templates/Modern/BoardAsThread.xslt
  5. 12
      templates/Modern/Conversation.xslt
  6. 12
      templates/Modern/Conversations.xslt
  7. 5
      templates/Modern/PollsList.xslt
  8. 10
      templates/Modern/Thread.xslt
  9. 10
      templates/Modern/UploadList.xslt
  10. 1
      templates/Modern/UserList.xslt
  11. 5
      templates/Modern/UserPollsParticipated.xslt
  12. 10
      templates/Modern/UserPosts.xslt
  13. 10
      templates/Modern/UserReplies.xslt
  14. 10
      templates/Modern/UserThreads.xslt
  15. 11
      templates/Modern/elems/ConversationInfo.xslt
  16. 98
      templates/Modern/elems/Main.xslt
  17. 11
      templates/Modern/elems/ThreadInfo.xslt

@ -7,19 +7,11 @@
</xsl:template> </xsl:template>
<xsl:template name="isRssEnabled">true</xsl:template> <xsl:template name="isRssEnabled">true</xsl:template>
<xsl:template name="specific"> <xsl:template name="specific">
<div> <xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
<xsl:call-template name="Messages_PageOuterTitle"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
</div>
<div class="postscontainer"> <div class="postscontainer">
<xsl:apply-templates select="posts/post"/> <xsl:apply-templates select="posts/post"/>
</div> </div>
<div> <xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
<xsl:call-template name="Messages_PageOuterTitle"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
</div>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

@ -7,19 +7,11 @@
</xsl:template> </xsl:template>
<xsl:template name="isRssEnabled">true</xsl:template> <xsl:template name="isRssEnabled">true</xsl:template>
<xsl:template name="specific"> <xsl:template name="specific">
<div> <xsl:apply-templates select="threads/pageOuter" mode="withCurrent"/>
<xsl:call-template name="Messages_PageOuterTitle"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="threads/pageOuter" mode="withCurrent"/>
</div>
<div class="threadscontainer"> <div class="threadscontainer">
<xsl:apply-templates select="threads/thread"/> <xsl:apply-templates select="threads/thread"/>
</div> </div>
<div> <xsl:apply-templates select="threads/pageOuter" mode="withCurrent"/>
<xsl:call-template name="Messages_PageOuterTitle"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="threads/pageOuter" mode="withCurrent"/>
</div>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

@ -14,11 +14,7 @@
<xsl:apply-templates select="boards/board"/> <xsl:apply-templates select="boards/board"/>
</div> </div>
</xsl:if> </xsl:if>
<div> <xsl:apply-templates select="threads/pageOuter" mode="withCurrent"/>
<xsl:call-template name="Messages_PageOuter"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="threads/pageOuter" mode="withCurrent"/>
</div>
<div class="threadscontainer"> <div class="threadscontainer">
<xsl:if test="threads/thread[isAnnouncement='true']"> <xsl:if test="threads/thread[isAnnouncement='true']">
<div style="position:relative;z-index:1000"> <div style="position:relative;z-index:1000">
@ -29,11 +25,7 @@
<xsl:apply-templates select="threads/thread[not(isAnnouncement='true')]"/> <xsl:apply-templates select="threads/thread[not(isAnnouncement='true')]"/>
</div> </div>
</div> </div>
<div> <xsl:apply-templates select="threads/pageOuter" mode="withCurrent"/>
<xsl:call-template name="Messages_PageOuter"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="threads/pageOuter" mode="withCurrent"/>
</div>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

@ -7,19 +7,11 @@
</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">
<div> <xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
<xsl:call-template name="Messages_PageOuter"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
</div>
<div class="postscontainer"> <div class="postscontainer">
<xsl:apply-templates select="posts/post"/> <xsl:apply-templates select="posts/post"/>
</div> </div>
<div> <xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
<xsl:call-template name="Messages_PageOuter"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
</div>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

@ -7,19 +7,11 @@
</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">
<div> <xsl:apply-templates select="messages/pageOuter" mode="withCurrent"/>
<xsl:call-template name="Messages_PageOuter"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="messages/pageOuter" mode="withCurrent"/>
</div>
<div class="postscontainer"> <div class="postscontainer">
<xsl:apply-templates select="messages/message"/> <xsl:apply-templates select="messages/message"/>
</div> </div>
<div> <xsl:apply-templates select="messages/pageOuter" mode="withCurrent"/>
<xsl:call-template name="Messages_PageOuter"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="messages/pageOuter" mode="withCurrent"/>
</div>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

@ -8,19 +8,11 @@
<xsl:template name="isLiteEnabled">true</xsl:template> <xsl:template name="isLiteEnabled">true</xsl:template>
<xsl:template name="isRssEnabled">true</xsl:template> <xsl:template name="isRssEnabled">true</xsl:template>
<xsl:template name="specific"> <xsl:template name="specific">
<div> <xsl:apply-templates select="conversations/pageOuter" mode="withCurrent"/>
<xsl:call-template name="Messages_PageOuter"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="conversations/pageOuter" mode="withCurrent"/>
</div>
<div class="conversationscontainer"> <div class="conversationscontainer">
<xsl:apply-templates select="conversations/conversation"/> <xsl:apply-templates select="conversations/conversation"/>
</div> </div>
<div> <xsl:apply-templates select="conversations/pageOuter" mode="withCurrent"/>
<xsl:call-template name="Messages_PageOuter"/>
<xsl:text>:</xsl:text>
<xsl:apply-templates select="conversations/pageOuter" mode="withCurrent"/>
</div>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

@ -18,10 +18,7 @@
<!-- END OF LOOP --> <!-- END OF LOOP -->
<tr class="tdheader"> <tr class="tdheader">
<td colspan="3"> <td colspan="3">
<font class="onbody"> <xsl:apply-templates select="polls/pageOuter" mode="withCurrent"/>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="polls/pageOuter" mode="withCurrent"/>
</font>
</td> </td>
</tr> </tr>
</table> </table>

@ -9,19 +9,13 @@
<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">
<div> <xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
</div>
<div class="postscontainer"> <div class="postscontainer">
<xsl:apply-templates select="posts/post"> <xsl:apply-templates select="posts/post">
<xsl:with-param name="isReplyDisabled"><xsl:value-of select="thread/isLocked"/></xsl:with-param> <xsl:with-param name="isReplyDisabled"><xsl:value-of select="thread/isLocked"/></xsl:with-param>
</xsl:apply-templates> </xsl:apply-templates>
</div> </div>
<div> <xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
</div>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

@ -6,17 +6,11 @@
<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">
<div> <xsl:apply-templates select="uploads/pageOuter" mode="withCurrent"/>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="uploads/pageOuter" mode="withCurrent"/>
</div>
<div class="uploadscontainer"> <div class="uploadscontainer">
<xsl:apply-templates select="uploads/upload"/> <xsl:apply-templates select="uploads/upload"/>
</div> </div>
<div> <xsl:apply-templates select="uploads/pageOuter" mode="withCurrent"/>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="uploads/pageOuter" mode="withCurrent"/>
</div>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

@ -41,7 +41,6 @@
<table width="100%" cellspacing="1" cellpadding="3" border="0"> <table width="100%" cellspacing="1" cellpadding="3" border="0">
<tr> <tr>
<td> <td>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="users/pageOuter" mode="withCurrent"/> <xsl:apply-templates select="users/pageOuter" mode="withCurrent"/>
</td> </td>
</tr> </tr>

@ -18,10 +18,7 @@
<!-- END OF LOOP --> <!-- END OF LOOP -->
<tr class="tdheader"> <tr class="tdheader">
<td colspan="3"> <td colspan="3">
<font class="onbody"> <xsl:apply-templates select="polls/pageOuter" mode="withCurrent"/>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="polls/pageOuter" mode="withCurrent"/>
</font>
</td> </td>
</tr> </tr>
</table> </table>

@ -8,17 +8,11 @@
</xsl:template> </xsl:template>
<xsl:template name="isRssEnabled">true</xsl:template> <xsl:template name="isRssEnabled">true</xsl:template>
<xsl:template name="specific"> <xsl:template name="specific">
<div> <xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
</div>
<div class="postscontainer"> <div class="postscontainer">
<xsl:apply-templates select="posts/post"/> <xsl:apply-templates select="posts/post"/>
</div> </div>
<div> <xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
</div>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

@ -8,17 +8,11 @@
</xsl:template> </xsl:template>
<xsl:template name="isRssEnabled">true</xsl:template> <xsl:template name="isRssEnabled">true</xsl:template>
<xsl:template name="specific"> <xsl:template name="specific">
<div> <xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
</div>
<div class="postscontainer"> <div class="postscontainer">
<xsl:apply-templates select="posts/post"/> <xsl:apply-templates select="posts/post"/>
</div> </div>
<div> <xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="posts/pageOuter" mode="withCurrent"/>
</div>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

@ -8,17 +8,11 @@
</xsl:template> </xsl:template>
<xsl:template name="isRssEnabled">true</xsl:template> <xsl:template name="isRssEnabled">true</xsl:template>
<xsl:template name="specific"> <xsl:template name="specific">
<div> <xsl:apply-templates select="threads/pageOuter" mode="withCurrent"/>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="threads/pageOuter" mode="withCurrent"/>
</div>
<div class="threadscontainer"> <div class="threadscontainer">
<xsl:apply-templates select="threads/thread[not(isAnnouncement='true')]"/> <xsl:apply-templates select="threads/thread[not(isAnnouncement='true')]"/>
</div> </div>
<div> <xsl:apply-templates select="threads/pageOuter" mode="withCurrent"/>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="threads/pageOuter" mode="withCurrent"/>
</div>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

@ -73,14 +73,9 @@
<xsl:text>Ďîńëĺäíĺĺ: </xsl:text> <xsl:text>Ďîńëĺäíĺĺ: </xsl:text>
<xsl:apply-templates select="lastMessageDate/date" mode="dateTime"/> <xsl:apply-templates select="lastMessageDate/date" mode="dateTime"/>
</p> </p>
<xsl:if test="pageOuter/isEmpty='false'"> <xsl:apply-templates select="pageOuter" mode="withoutCurrent">
<p> <xsl:with-param name="baseLink">/My/Conversations/Conversation/<xsl:value-of select="interlocutor/account/id"/>/</xsl:with-param>
<xsl:text>Ñòðàíèöû: </xsl:text> </xsl:apply-templates>
<xsl:apply-templates select="pageOuter" mode="withoutCurrent">
<xsl:with-param name="baseLink">/My/Conversations/Conversation/<xsl:value-of select="interlocutor/account/id"/>/</xsl:with-param>
</xsl:apply-templates>
</p>
</xsl:if>
</div> </div>
</div> </div>
</div> </div>

@ -240,11 +240,16 @@
<xsl:template match="pageOuter" mode="withoutCurrent"> <xsl:template match="pageOuter" mode="withoutCurrent">
<xsl:param name="baseLink"/> <xsl:param name="baseLink"/>
<xsl:apply-templates select="pages/page" mode="withoutCurrent"> <xsl:if test="isEmpty = 'false'">
<xsl:with-param name="baseLink"><xsl:value-of select="$baseLink"/></xsl:with-param> <p>
<xsl:with-param name="postfix"/> <xsl:text>Ñòðàíèöû: </xsl:text>
<xsl:with-param name="selected">-1</xsl:with-param> <xsl:apply-templates select="pages/page" mode="withoutCurrent">
</xsl:apply-templates> <xsl:with-param name="baseLink"><xsl:value-of select="$baseLink"/></xsl:with-param>
<xsl:with-param name="postfix"/>
<xsl:with-param name="selected">-1</xsl:with-param>
</xsl:apply-templates>
</p>
</xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="pageOuter" mode="withCurrent"> <xsl:template match="pageOuter" mode="withCurrent">
@ -252,51 +257,54 @@
<xsl:variable name="postfix"> <xsl:variable name="postfix">
<xsl:if test="isReversed='true'">-reversed</xsl:if> <xsl:if test="isReversed='true'">-reversed</xsl:if>
</xsl:variable> </xsl:variable>
<xsl:text> </xsl:text> <xsl:when test="total &gt; 0">
<xsl:apply-templates select="pages/page" mode="withoutCurrent"> <div>
<xsl:with-param name="baseLink"><xsl:value-of select="$baseLink"/></xsl:with-param> <xsl:call-template name="Messages_PageOuterTitle"/>
<xsl:with-param name="postfix"> <xsl:text>: </xsl:text>
<xsl:value-of select="$postfix"/> <xsl:apply-templates select="pages/page" mode="withoutCurrent">
</xsl:with-param> <xsl:with-param name="baseLink"><xsl:value-of select="$baseLink"/></xsl:with-param>
<xsl:with-param name="selected"> <xsl:with-param name="postfix" select="$postfix"/>
<xsl:choose> <xsl:with-param name="selected">
<xsl:when test="unlimited='false'"> <xsl:choose>
<xsl:value-of select="start"/> <xsl:when test="unlimited='false'">
</xsl:when> <xsl:value-of select="start"/>
<xsl:otherwise> </xsl:when>
<xsl:text>-1</xsl:text> <xsl:otherwise>
</xsl:otherwise> <xsl:text>-1</xsl:text>
</xsl:choose> </xsl:otherwise>
</xsl:with-param> </xsl:choose>
</xsl:apply-templates> </xsl:with-param>
<xsl:if test="total &lt;= 1000"> </xsl:apply-templates>
<xsl:text>&#8201;|&#8201;</xsl:text> <xsl:if test="(total &lt;= 1000) and isEmpty = 'false'">
<xsl:choose> <xsl:text>&#8201;|&#8201;</xsl:text>
<xsl:when test="unlimited='false'"> <xsl:choose>
<a> <xsl:when test="unlimited='false'">
<a>
<xsl:attribute name="href">
<xsl:value-of select="$baseLink"/>
<xsl:text>all</xsl:text>
<xsl:value-of select="$postfix"/>
</xsl:attribute>
<xsl:text>âñå</xsl:text>
</a>
</xsl:when>
<xsl:otherwise>
<a class="current">âñå</a>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test="next">
<xsl:text>&#8201;|&#8201;</xsl:text>
<a rel="next">
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:value-of select="$baseLink"/> <xsl:value-of select="$baseLink"/>
<xsl:text>all</xsl:text> <xsl:value-of select="next"/>
<xsl:value-of select="$postfix"/> <xsl:value-of select="$postfix"/>
</xsl:attribute> </xsl:attribute>
<xsl:text>âñå</xsl:text> <xsl:text>Ñëåäóþùàÿ ñòðàíèöà</xsl:text>
</a> </a>
</xsl:when> </xsl:if>
<xsl:otherwise> </div>
<a class="current">âñå</a>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test="next">
<xsl:text>&#8201;|&#8201;</xsl:text>
<a rel="next">
<xsl:attribute name="href">
<xsl:value-of select="$baseLink"/>
<xsl:value-of select="next"/>
<xsl:value-of select="$postfix"/>
</xsl:attribute>
<xsl:text>Ñëåäóþùàÿ ñòðàíèöà</xsl:text>
</a>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>

@ -108,14 +108,9 @@
<xsl:text>Ïðîñìîòðîâ: </xsl:text> <xsl:text>Ïðîñìîòðîâ: </xsl:text>
<xsl:value-of select="totalViews"/> <xsl:value-of select="totalViews"/>
</p> </p>
<xsl:if test="pageOuter/isEmpty='false'"> <xsl:apply-templates select="pageOuter" mode="withoutCurrent">
<p> <xsl:with-param name="baseLink">/Thread/<xsl:value-of select="id"/>/</xsl:with-param>
<xsl:text>Ñòðàíèöû: </xsl:text> </xsl:apply-templates>
<xsl:apply-templates select="pageOuter" mode="withoutCurrent">
<xsl:with-param name="baseLink">/Thread/<xsl:value-of select="id"/>/</xsl:with-param>
</xsl:apply-templates>
</p>
</xsl:if>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save