An alternative to UBB.threads
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
FLocal/templates/Modern/elems/PostInfo.xslt

209 lines
8.3 KiB

<?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="UserInfoBar.xslt"/>
<xsl:template match="post">
<xsl:param name="isReplyDisabled">true</xsl:param>
<div class="postcontainer" style="clear:both">
<a><xsl:attribute name="name">Post<xsl:value-of select="id"/></xsl:attribute></a>
<div class="userbarcontainer" style="float:left">
<xsl:apply-templates select="poster/user" mode="userInfoBar"/>
</div>
<div class="linkscontainer" style="float:right;text-align:right;">
<a>
<xsl:if test="$isReplyDisabled='false'">
<xsl:if test="/root/session/sessionKey">
<xsl:attribute name="href">/Post/<xsl:value-of select="id"/>/Reply/</xsl:attribute>
<xsl:attribute name="onClick">submitSelText(this.href);return false;</xsl:attribute>
<xsl:attribute name="onMouseDown">submitSelText(this.href);return false;</xsl:attribute>
</xsl:if>
</xsl:if>
<xsl:apply-templates select="postDate/date" mode="navigationImageFor">
<xsl:with-param name="src">reply.gif</xsl:with-param>
<xsl:with-param name="alt"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></xsl:with-param>
</xsl:apply-templates>
</a>
<xsl:text> </xsl:text>
<a>
<xsl:if test="/root/session/sessionKey">
<xsl:attribute name="href">/Post/<xsl:value-of select="id"/>/PMReply/</xsl:attribute>
<xsl:attribute name="onClick">submitSelText(this.href);return false;</xsl:attribute>
<xsl:attribute name="onMouseDown">submitSelText(this.href);return false;</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="postDate/date" mode="navigationImageFor">
<xsl:with-param name="src">email2.gif</xsl:with-param>
<xsl:with-param name="alt"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD></xsl:with-param>
</xsl:apply-templates>
</a>
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="isPunishmentEnabled='true'">
<a>
<xsl:attribute name="href">/Post/<xsl:value-of select="id"/>/Punish/</xsl:attribute>
<xsl:apply-templates select="postDate/date" mode="navigationImageFor">
<xsl:with-param name="src">punish.gif</xsl:with-param>
<xsl:with-param name="alt"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></xsl:with-param>
</xsl:apply-templates>
</a>
</xsl:when>
<xsl:otherwise>
<a>
<xsl:apply-templates select="postDate/date" mode="navigationImageFor">
<xsl:with-param name="src">notifymod.gif</xsl:with-param>
<xsl:with-param name="alt"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></xsl:with-param>
</xsl:apply-templates>
</a>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="isOwner='true'">
<br/>
<a>
<xsl:attribute name="href">/Post/<xsl:value-of select="id"/>/Edit/</xsl:attribute>
<xsl:apply-templates select="postDate/date" mode="navigationImageFor">
<xsl:with-param name="src">edit.gif</xsl:with-param>
<xsl:with-param name="alt"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></xsl:with-param>
</xsl:apply-templates>
</a>
</xsl:if>
</div>
<div class="postcontent">
<a target="_blank" class="separate">
<xsl:attribute name="href">/Post/<xsl:value-of select="id"/>/</xsl:attribute>
<xsl:variable name="postDate"><xsl:apply-templates select="postDate/date" mode="dateTime"/></xsl:variable>
<xsl:attribute name="title"><xsl:value-of select="$postDate"/></xsl:attribute>
<img border="0" alt="" style="vertical-align: text-bottom">
<xsl:choose>
<xsl:when test="isUnread='true'">
<xsl:attribute name="src">/static/images/message-<xsl:value-of select="layerName"/>-notread.gif</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="src">/static/images/message-<xsl:value-of select="layerName"/>-read.gif</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</img>
</a>
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="parentPost/post">
<font class="small separate">
<xsl:text>[</xsl:text>
<a>
<xsl:attribute name="title"><xsl:value-of select="parentPost/post/bodyShort"/></xsl:attribute>
<xsl:attribute name="href">/Thread/<xsl:value-of select="threadId"/>/p<xsl:value-of select="parentPost/post/id"/>/</xsl:attribute>
<xsl:text>re: </xsl:text>
<xsl:value-of select="parentPost/post/poster/user/name"/>
</a>
<xsl:text>]</xsl:text>
</font>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
<div class="postbody">
<xsl:value-of select="body" disable-output-escaping="yes" />
</div>
<xsl:apply-templates select="specific"/>
<xsl:if test="poster/user/signature != ''">
<div style="width:100%;max-height:3.5em;height: expression( this.scrollHeight > 49 ? '50px' : 'auto' );overflow:hidden;text-align:right;font-size:0.8em;">
<xsl:value-of select="poster/user/signature" disable-output-escaping="yes" />
</div>
</xsl:if>
</div>
<div style="clear:both;" class="zerosize"><xsl:comment>zerosize</xsl:comment></div>
</div>
</xsl:template>
<xsl:template match="specific/changeInfo">
<xsl:if test="(revision != '') and (revision != '0')">
<span style="font-size:0.8em" class="revision">
<xsl:value-of select="revision"/>
<xsl:text> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </xsl:text>
<xsl:apply-templates select="lastChangeDate/date" mode="dateTime"/>
</span>
<xsl:text> </xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="specific/punishment">
<xsl:if test="not(isWithdrawed='true')">
<span style="font-size:0.8em" class="punishment">
<xsl:value-of select="punishmentType/description"/>
<xsl:text>. </xsl:text>
<xsl:value-of select="comment"/>
<xsl:text> (</xsl:text>
<xsl:apply-templates select="moderator/user" mode="userLink"/>
<xsl:text>, </xsl:text>
<xsl:apply-templates select="punishmentDate/date" mode="dateTime"/>
<xsl:text>).</xsl:text>
<xsl:if test="transfer">
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="transfer/isSubthreadTransfer='true'">
<xsl:text><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="transfer/oldParentPost">
<xsl:text> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </xsl:text>
<a>
<xsl:attribute name="href">
<xsl:text>/Post/</xsl:text>
<xsl:value-of select="transfer/oldParentPost/post/id"/>
<xsl:text>/</xsl:text>
</xsl:attribute>
<xsl:value-of select="transfer/oldParentPost/post/title"/>
</a>
</xsl:if>
<xsl:text> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> </xsl:text>
<a>
<xsl:attribute name="href">
<xsl:text>/Board/</xsl:text>
<xsl:value-of select="transfer/oldBoard/board/id"/>
<xsl:text>/</xsl:text>
</xsl:attribute>
<xsl:value-of select="transfer/oldBoard/board/name"/>
</a>
<xsl:text>.</xsl:text>
</xsl:if>
<xsl:if test="layerChange">
<xsl:text> </xsl:text>
<xsl:text><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> </xsl:text>
<xsl:value-of select="layerChange/oldLayer/layer/name"/>
<xsl:text>.</xsl:text>
</xsl:if>
</span>
</xsl:if>
</xsl:template>
<xsl:template match="specific/thread">
<div class="discussionlinkcontainer">
<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:text><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></xsl:text>
</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>
</div>
</xsl:template>
</xsl:stylesheet>