first commit
This commit is contained in:
@@ -0,0 +1,252 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>样式类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>@queryCond</LabelSqlString>
|
||||
<attributes>
|
||||
<name>titleLength</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>50</default>
|
||||
<intro>项目标题长度,一个汉字占两个字节</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayPropertyPrefix</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目列表前缀修饰符{不启用:0,样式一:1,样式二:2,样式三:3,样式四:4,样式五:5,样式六:6,样式七:7,样式八:8,样式九:9,样式十:10}</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayDateTime</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>mm-dd</default>
|
||||
<intro>是否显示日期,为空则不显示</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayTitlePrefix</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示项目前缀修饰语</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayHits</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示项目点击数</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayTips</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示作者,更新日期,点击数等浮动提示信息</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayInputer</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示内容的录入者</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayNodeName</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示所属栏目名称</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayHotSign</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示热门内容图标</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayNewSign</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示新内容图标</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayCommentLink</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示评论链接</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>linkOpenType</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>2</default>
|
||||
<intro>项目链接的打开方式{栏目节点配置取代:2,新窗口:1,原窗口:0}</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalExtend</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default />
|
||||
<intro>可选扩展参数</intro>
|
||||
</attributes>
|
||||
<LabelTemplate><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:lewi="http://www.powereasy.net" xmlns:pe="labelproc" exclude-result-prefixes="pe ms lewi">
|
||||
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="titleLength" />
|
||||
<xsl:param name="displayPropertyPrefix" />
|
||||
<xsl:param name="displayDateTime" />
|
||||
<xsl:param name="displayTitlePrefix" />
|
||||
<xsl:param name="displayHits" />
|
||||
<xsl:param name="displayTips" />
|
||||
<xsl:param name="displayInputer" />
|
||||
<xsl:param name="displayNodeName" />
|
||||
<xsl:param name="displayHotSign" />
|
||||
<xsl:param name="displayNewSign" />
|
||||
<xsl:param name="displayCommentLink" />
|
||||
<xsl:param name="linkOpenType" />
|
||||
<xsl:param name="optionalExtend" />
|
||||
<xsl:param name="queryCond" />
|
||||
<xsl:param name="queryCount" />
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(/NewDataSet/Table) = 0">
|
||||
<li style="color:red">还没有任何项目!</li>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<li>
|
||||
<xsl:if test="$displayPropertyPrefix != 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="Hits > pe:HitsOfHot()">
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="pe:InstallDir()"/>images/ontop<xsl:value-of select="$displayPropertyPrefix"/>.gif</xsl:attribute>
|
||||
<xsl:attribute name="alt">热门<xsl:value-of select="pe:GetModelItemName(ModelID)"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:when test="EliteLevel > pe:LeastOfEliteLevel()">
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="pe:InstallDir()"/>images/elite<xsl:value-of select="$displayPropertyPrefix"/>.gif</xsl:attribute>
|
||||
<xsl:attribute name="alt">推荐<xsl:value-of select="pe:GetModelItemName(ModelID)"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="pe:InstallDir()"/>images/common<xsl:value-of select="$displayPropertyPrefix"/>.gif</xsl:attribute>
|
||||
<xsl:attribute name="alt">普通<xsl:value-of select="pe:GetModelItemName(ModelID)"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
<xsl:if test="$displayNodeName = 'true'">[<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:GetNodePath(false,NodeID)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="target">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$linkOpenType = 2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="pe:GetNodeInfo(NodeID,'OpenType') = 0">_self</xsl:when>
|
||||
<xsl:otherwise>_blank</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="$linkOpenType = 1">_blank</xsl:when>
|
||||
<xsl:when test="$linkOpenType = 0">_self</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$linkOpenType"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="pe:GetNode(NodeID,'name')" />
|
||||
</a>]</xsl:if> <xsl:if test="$displayTitlePrefix = 'true'">
|
||||
<xsl:if test="IncludePic != '无'">
|
||||
<xsl:value-of select="IncludePic"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:if test="$displayDateTime != 0">[<xsl:value-of select="pe:FormatDate(UpdateTime, $displayDateTime)" />] </xsl:if>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:GetInfoPath(NodeID,GeneralID,InputTime,PinyinTitle,HtmlPageName)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="target">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$linkOpenType = 2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="pe:GetNodeInfo(NodeID,'ItemOpenType') = 0">_self</xsl:when>
|
||||
<xsl:otherwise>_blank</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="$linkOpenType = 1">_blank</xsl:when>
|
||||
<xsl:when test="$linkOpenType = 0">_self</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$linkOpenType"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:if test="$displayTips = 'true'">
|
||||
<xsl:attribute name="title">标题:<xsl:value-of select="Title"/>
|
||||
<xsl:value-of select="'
'" />点击数:<xsl:value-of select="Hits"/>
|
||||
<xsl:value-of select="'
'" />发表时间:<xsl:value-of select="pe:FormatDate(UpdateTime, 'yy年mm月dd日')" />
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="TitleFontColor != '' or TitleFontType != '字形'">
|
||||
<font>
|
||||
<xsl:attribute name="style">
|
||||
<xsl:if test="TitleFontColor != ''">color:<xsl:value-of select="TitleFontColor"/>;</xsl:if>
|
||||
<xsl:if test="TitleFontType != '字形'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="TitleFontType ='粗体'">font-weight:bold;font-style:normal;</xsl:when>
|
||||
<xsl:when test="TitleFontType ='斜体'">font-weight:normal ;font-style:italic ;</xsl:when>
|
||||
<xsl:when test="TitleFontType ='粗+斜'">font-weight:bold;font-style:italic ;</xsl:when>
|
||||
<xsl:when test="TitleFontType ='常规'">font-weight:normal ;font-style:normal;</xsl:when>
|
||||
<xsl:otherwise>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>;</xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of disable-output-escaping="yes" select="pe:CutText(Title,$titleLength,'…')" />
|
||||
</font>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of disable-output-escaping="yes" select="pe:CutText(Title,$titleLength,'…')" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
<xsl:if test="$displayHits = 'true'">[<xsl:value-of select="Hits"/>]</xsl:if>
|
||||
<xsl:if test="$displayInputer = 'true'">[<xsl:value-of select="Inputer"/>]</xsl:if>
|
||||
<xsl:if test="$displayCommentLink = 'true' and ShowCommentLink = 'true'">[<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:InstallDir()" />Comment/AddComment.aspx?itemId=<xsl:value-of select="GeneralID"/>&nodeId=<xsl:value-of select="NodeID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="target">_blank</xsl:attribute>评论</a>]</xsl:if>
|
||||
<xsl:if test="$displayHotSign = 'true' and Hits > pe:HitsOfHot()">
|
||||
<img src="{pe:InstallDir()}images/hot.gif" alt="热门内容" />
|
||||
</xsl:if>
|
||||
<xsl:if test="$displayNewSign != '' and $displayNewSign > pe:TimeSpan(UpdateTime,pe:TimeNow())">
|
||||
<img src="{pe:InstallDir()}images/new.gif" alt="最新内容" />
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>queryCond</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>SELECT TOP 10 * FROM PE_CommonModel</default>
|
||||
<intro>查询条件</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>queryCount</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>统计条件</intro>
|
||||
</attributes>
|
||||
<UsePage>True</UsePage>
|
||||
<LabelSqlCount>@queryCount</LabelSqlCount>
|
||||
</root>
|
||||
Reference in New Issue
Block a user