您的位置: 首页 >日志>动易系统>详细内容

动易系统

调查问卷标签样式修改

来源:本站原创 发布时间:2017-01-01 16:23:04 浏览次数: 【字体:

一般我们默认的问卷调查标签是这种形式:

 

因为临澧县政府项目设计图的原因,改造了这个标签。

我们首先复制一下默认的问卷调查标签:

我们要在sql语句上添加时间和描述的字段 :Description  ,  CreateDate

  1.    SELECT TOP @pagesize SurveyName,SurveyID,CreateDate,Description,FileName,IsOpen FROM PE_Survey WHERE SurveyID NOT IN
  2.    SELECT TOP @startrow SurveyID from PE_Survey WHERE IsOpen = 1 ORDER BY CreateDate DESC  
  3.    ) AND IsOpen = 1 ORDER BY CreateDate DESC  
  4.  

接着是添加时间这个参数

  1. <attributes>
  2.           <name>displayDateTimename>
  3.           <datatype>stringdatatype>
  4.           <default>
  5.           default>
  6.           <intro>是否显示日期,为空则不显示intro>
  7.         attributes>

最后把下面的架构全部打掉,重新编辑:

  1. <xsl:choose>
  2.           <xsl:when test="count(/NewDataSet/Table) = 0">
  3.             <li class="noData">暂无资料li>
  4.           xsl:when>
  5.  
  6.           <xsl:otherwise>
  7.             <xsl:for-each select="/NewDataSet/Table">
  8.               <xsl:choose>
  9.                 <xsl:when test="$topicNum > 0 and position() <= $topicNum">
  10.                   <li class="t">
  11.                     <div class="con">
  12.                       <div class="title">
  13.                         <a class="ques">
  14.                           <xsl:attribute name="href">{PE.SiteConfig.ApplicationPath/}Survey/<xsl:value-of select="FileName"/>xsl:attribute>
  15.                           <xsl:attribute name="target">_blankxsl:attribute>
  16.                           <xsl:attribute name="title">
  17.                             <xsl:value-of select="SurveyName"/>
  18.                           xsl:attribute>
  19.                           <xsl:value-of select="pe:CutText(SurveyName,$titleLength,'...')"/>
  20.                         a>
  21.                       div>
  22.                       
  23.                       <xsl:if test="$contentLength > 0">
  24.                         <div class="intro">
  25.                           <xsl:if test="Description != ''"><xsl:value-of  disable-output-escaping="yes" select="pe:CutText(pe:RemoveHtml(Description),$contentLength,'…')" />
  26.                         xsl:if>
  27.                       div>
  28.                     xsl:if>
  29.                   div>
  30.                   
  31.                   <a class="join">  
  32.                     <xsl:attribute name="href">
  33.                      {PE.SiteConfig.ApplicationPath/}Survey/<xsl:value-of select="FileName"/>
  34.                    xsl:attribute>
  35.                    <xsl:attribute name="target">_blankxsl:attribute>参与调查a>
  36.                   <a class="view">
  37.                     <xsl:attribute name="href">
  38.                       {PE.SiteConfig.ApplicationPath/}Survey/ListReport.aspx?SurveyID=<xsl:value-of select="SurveyID"/>
  39.                     xsl:attribute>查看结果a>
  40.  
  41.                 li>
  42.               xsl:when>
  43.               <xsl:otherwise>
  44.                 <li class="n">
  45.                   <xsl:if test="$displayDateTime != ''"><span class="date"><xsl:value-of select="pe:FormatDate(CreateDate, $displayDateTime)"/>span>xsl:if>
  46.                   <a class="ques">
  47.                     <xsl:attribute name="href">{PE.SiteConfig.ApplicationPath/}Survey/<xsl:value-of select="FileName"/>
  48.                     xsl:attribute>
  49.                     <xsl:attribute name="target">_blank 
  50.                     xsl:attribute>
  51.                     <xsl:attribute name="title">
  52.                       <xsl:value-of select="SurveyName"/>
  53.                     xsl:attribute>
  54.                     <xsl:value-of select="pe:CutText(SurveyName,$titleLength,'...')"/>
  55.                   a>
  56.                 li>     
  57.               xsl:otherwise>
  58.           xsl:choose>

就这样完成一个头条信息问卷调查,通过这个标签,也延伸一个内容信息问卷调查标签:

附带2个标签

头条信息问卷调查

内容信息问卷调查

×

用户登录