first commit
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>信息投票</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>True</EnabelAjax>
|
||||
<attributes>
|
||||
<name>VoteId</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>信息投票ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT * FROM PE_VT_Vote WHERE Id=@VoteId AND State > 0 </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:template match="/NewDataSet">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(/NewDataSet/Table) = 0">
|
||||
<span style="color:red">没有要显示的投票主题!</span>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<form id="Vote{Id}" action="{pe:InstallDir()}Vote/ShowVote.aspx" name="Vote{Id}" method="post"
|
||||
target='_blank'>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>
|
||||
<span style='color:red'>
|
||||
<xsl:value-of select="Title" />
|
||||
</span>
|
||||
</h4>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td>
|
||||
{PE.Label id="信息投票列表" VoteId="<xsl:value-of select="Id" />" IsCheck="<xsl:value-of select="IsCheck" />" titleLength="50" /}
|
||||
</td>
|
||||
</tr>
|
||||
<input id="ID" type="hidden" value="{Id}" name="ID" />
|
||||
<tr>
|
||||
<td align="center">
|
||||
<xsl:if test="State=1 and pe:TimeSpan(pe:FormatDate(pe:TimeNow(),'yyyy-mm-dd'),EndTime) >= 0">
|
||||
<input id="btnVote" type="button" onclick="SubmitVote{Id}()" name="btnVote" value="投票" />
|
||||
</xsl:if>
|
||||
<span style="margin: 5px;"> </span>
|
||||
<input id="ShowVote" type="button" onclick="ShowVoteResult{Id}();" name="ShowVote" value="查看" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a id='voteView{Id}'>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:InstallDir()" />Vote/ShowVote.aspx?Id=<xsl:value-of select="Id" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="target">
|
||||
_blank
|
||||
</xsl:attribute>
|
||||
</a>
|
||||
<script type="text/javascript" language="javascript">
|
||||
function SubmitVote<xsl:value-of select="Id" />(){document.Vote<xsl:value-of select="Id" />.submit();}
|
||||
function ShowVoteResult<xsl:value-of select="Id" />(){
|
||||
var obj=document.getElementById('voteView<xsl:value-of select="Id" />');
|
||||
if (obj.getAttribute('onclick') == null) {
|
||||
if (obj.getAttribute('href')) window.open(obj.getAttribute('href'));
|
||||
}
|
||||
else{
|
||||
obj.onclick();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</form>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:transform>
|
||||
]]></LabelTemplate>
|
||||
</root>
|
||||
Reference in New Issue
Block a user