CBQW ---分组表单展示

工作流审核表单后,将表单信息展示页面中。

Rest读取展示

 

展示方式有2

一.              CBQW内容查询,

通过CBQW内容查询。分别通过设置itemstyle和header xslt文件。控制每项的样式和 分组的样式

Itemstyle:

  

 

 1  <xsl:template name="Test" match="Row[@Style='Test']" mode="itemstyle">                                           
 2         <xsl:variable name="SafeImageUrl">
 3             <xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
 4                 <xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
 5             </xsl:call-template>
 6         </xsl:variable>
 7         <xsl:variable name="SafeLinkUrl">
 8             <xsl:call-template name="OuterTemplate.GetSafeLink">
 9                 <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
10             </xsl:call-template>
11         </xsl:variable>
12          <xsl:variable name="BDLinkUrl">
13            <xsl:value-of select="substring-before(@a,',')"></xsl:value-of>
14         </xsl:variable>
15 
16         <xsl:variable name="DisplayTitle">
17             <xsl:call-template name="OuterTemplate.GetTitle">
18                 <xsl:with-param name="Title" select="@Title"/>
19                 <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
20             </xsl:call-template>
21         </xsl:variable>
22         
23         <xsl:variable name="displayTitle">
24               <xsl:choose>
25             <xsl:when test="string-length($DisplayTitle) &gt; 8">
26               <xsl:value-of select="substring($DisplayTitle,1,8)"/>...
27             </xsl:when>
28             <xsl:otherwise>
29               <xsl:value-of select="$DisplayTitle"/>
30             </xsl:otherwise>
31           </xsl:choose>
32           </xsl:variable>
33         <li class="fund-li" style=" padding-left:0px;"><img src="/teams/dev/Style Library/zh-cn/style/images/arr.png"/><a class="leftpart" style="color:#333333" href="{$SafeLinkUrl}" target="_blank" title="{$DisplayTitle}">查看表单 </a>
34         <xsl:value-of select="$displayTitle"></xsl:value-of> | 
35          
36 <a href="{$BDLinkUrl}">状态: <xsl:value-of select="substring-after(@a,',')"></xsl:value-of></a>|     
37           Name:<xsl:value-of select="@name"></xsl:value-of>|
38           Age:<xsl:value-of select="@age"></xsl:value-of>|
39 Sports:<xsl:value-of select="@sport"></xsl:value-of>|
40          </li>
41   </xsl:template>
itemstyle.xslt

 

 

<xsl:template name="test" match="*[@GroupStyle='test']" mode="header">

 <div style=" background:gray; height:30px; width:800px;  line-height:30px; font-weight:bold;">

   <xsl:call-template name="OuterTemplate.GetGroupName">

          <xsl:with-param name="GroupName" select="@*[name()=$Group]"/>

          <xsl:with-param name="GroupType" select="$GroupType"/>

      </xsl:call-template>
 </div>   
  </xsl:template>
header.xslt

 

 

 

二.               通过rest 读取分组信息(工作流配合)

       通过工作流中更新字段值status(代表审批状态),因而, rest中通过直接过滤status 来达到获取不同分组的信息。

在工作流中通过“操作”-〉设置当前项目中的字段

 

 

然后通过url:        https://{website}/_api/web/lists/getbytitle('Sports%20Investions')/items?$filter=Status%20eq%20'Approving'

 

获取分组信息

 

 

 

 

参考url:http://msdn.microsoft.com/en-us/library/ie/bb447557.aspx

rest 参数操作http://msdn.microsoft.com/zh-cn/library/gg309461.aspx#BKMK_filter

转载于:https://www.cnblogs.com/akak123/p/3224568.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值