first commit
This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>来源类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<attributes>
|
||||
<name>outputQty</name>
|
||||
<default>5</default>
|
||||
<intro>显示来源数</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayType</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示方式{普通:0,头像和说明:1,头像无说明:2}</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>imageHeight</name>
|
||||
<default>175</default>
|
||||
<intro>头像高度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>imageWidth</name>
|
||||
<default>150</default>
|
||||
<intro>头像宽度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>contentLength</name>
|
||||
<default>50</default>
|
||||
<intro>作者简介的字数</intro>
|
||||
</attributes>
|
||||
<LabelSqlString><![CDATA[<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
|
||||
<xsl:output method="xml" />
|
||||
<xsl:param name="type"/>
|
||||
<xsl:template match="/">
|
||||
<root>
|
||||
<sql>
|
||||
SELECT TOP @outputQty * FROM PE_Source WHERE
|
||||
<xsl:choose>
|
||||
<xsl:when test="type = 1">
|
||||
onTop = 1
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
IsElite = 1
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
AND Passed = 1
|
||||
</sql>
|
||||
<countsql>
|
||||
</countsql>
|
||||
</root>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelSqlString>
|
||||
<LabelTemplate><![CDATA[<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
|
||||
<xsl:output method="html" />
|
||||
<xsl:param name="displayType"/>
|
||||
<xsl:param name="imageHeight"/>
|
||||
<xsl:param name="imageWidth"/>
|
||||
<xsl:param name="contentLength"/>
|
||||
<xsl:template match="/NewDataSet">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(/NewDataSet/Table) = 0">
|
||||
<li style="color:red">没有来源!</li>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="Table">
|
||||
<li>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:InstallDir()"/>Common/ShowCopyFrom.aspx?copyfrom=<xsl:value-of select="Name"/>
|
||||
</xsl:attribute>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$displayType=1">
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="Photo"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border">0</xsl:attribute>
|
||||
<xsl:attribute name="width">
|
||||
<xsl:value-of select="$imageWidth"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="height">
|
||||
<xsl:value-of select="$imageHeight"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="alt">
|
||||
<xsl:value-of select="Name"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
<br />
|
||||
<xsl:value-of disable-output-escaping="yes" select="pe:CutText(Intro,$contentLength,'…')"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$displayType=2">
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="Photo"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border">0</xsl:attribute>
|
||||
<xsl:attribute name="width">
|
||||
<xsl:value-of select="$imageWidth"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="height">
|
||||
<xsl:value-of select="$imageHeight"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="alt">
|
||||
<xsl:value-of select="Name"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="Name"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<IsXsltSql>true</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<attributes>
|
||||
<name>type</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>输出类型{推荐:2,固顶:1}</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>来源类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>
|
||||
</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<LabelSqlString><![CDATA[SELECT * FROM PE_Source WHERE Name='@copyfrom'AND Passed=1]]></LabelSqlString>
|
||||
<LabelTemplate>
|
||||
<![CDATA[<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
|
||||
<xsl:output method="xml" />
|
||||
<xsl:param name="authorname"/>
|
||||
<xsl:param name="photowidth"/>
|
||||
<xsl:param name="photoheight"/>
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
<Root>
|
||||
<ShowType>
|
||||
<xsl:value-of select="Type"/>
|
||||
</ShowType>
|
||||
<ShowName>
|
||||
<xsl:value-of select="Name"/>
|
||||
</ShowName>
|
||||
<ShowPhoto>
|
||||
<xsl:choose>
|
||||
<xsl:when test="Photo!=''">
|
||||
<xsl:value-of select="Photo"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
nopic.gif
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</ShowPhoto>
|
||||
<ShowIntro>
|
||||
<xsl:value-of select="Intro"/>
|
||||
</ShowIntro>
|
||||
<ShowAddress>
|
||||
<xsl:value-of select="Address"/>
|
||||
</ShowAddress>
|
||||
<ShowTel>
|
||||
<xsl:value-of select="Tel"/>
|
||||
</ShowTel>
|
||||
<ShowFax>
|
||||
<xsl:value-of select="Fax"/>
|
||||
</ShowFax>
|
||||
<ShowMail>
|
||||
<xsl:value-of select="Mail"/>
|
||||
</ShowMail>
|
||||
<ShowEmail>
|
||||
<xsl:value-of select="Email"/>
|
||||
</ShowEmail>
|
||||
<ShowZipCode>
|
||||
<xsl:value-of select="ZipCode"/>
|
||||
</ShowZipCode>
|
||||
<ShowHomePage>
|
||||
<xsl:value-of select="HomePage"/>
|
||||
</ShowHomePage>
|
||||
<ShowImeeting>
|
||||
<xsl:value-of select="Im"/>
|
||||
</ShowImeeting>
|
||||
<ShowContacter>
|
||||
<xsl:value-of select="Contacter"/>
|
||||
</ShowContacter>
|
||||
|
||||
</Root>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>copyfrom</name>
|
||||
<default>
|
||||
</default>
|
||||
<intro>来源</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
Reference in New Issue
Block a user