Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.07 KB | None | 0 0
  1. <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
  2. <head>
  3. <title>List Table Item</title>
  4.  
  5. <!--[if gte mso 9]><xml>
  6. <mso:CustomDocumentProperties>
  7. <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
  8. <mso:ManagedPropertyMapping msdt:dt="string">ListID','ListItemID','ContentTypeId','Link URL':'Path','Property 1':'Title','Property 2':'','Property 3':'','Property 4:'','Property 5':'','Property 6':'','Property 7':'','Property 8':'','Property 9':'','Property 10':'','FileExtension','SecondaryFileExtension'</mso:ManagedPropertyMapping>
  9. <mso:MasterPageDescription msdt:dt="string">This is the item row template, use this template in combination with the List Table Control template.</mso:MasterPageDescription>
  10. <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
  11. <mso:TargetControlType msdt:dt="string">;#Content Web Parts;#</mso:TargetControlType>
  12. <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
  13. <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://be-dmsgtsdev003.be.ema.pwcinternal.com/_catalogs/masterpage/Display Templates/Content Web Parts/Item_List_Item.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
  14. <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
  15. <mso:CrawlerXSLFile msdt:dt="string"></mso:CrawlerXSLFile>
  16. <mso:HtmlDesignPreviewUrl msdt:dt="string"></mso:HtmlDesignPreviewUrl>
  17. </mso:CustomDocumentProperties>
  18. </xml><![endif]-->
  19. </head>
  20.  
  21. <body>
  22. <div id="TwoLines">
  23. <!--#_
  24. // Give up your names for the properties in the following array
  25. var propertyNames = {"Property 1":"File Name","Property 2":"Last modified by","Property 3":"Last modified date","Property 4":"Content type","Property 5":"Library"};
  26.  
  27. var encodedId = $htmlEncode(ctx.ClientControl.get_nextUniqueId() + "_tableitems_");
  28.  
  29. var linkURL = $getItemValue(ctx, "Link URL");
  30. var libraryLink = $getItemValue(ctx, "ParentLink");
  31. linkURL.overrideValueRenderer($urlHtmlEncode);
  32. var iconURL = Srch.ContentBySearch.getIconSourceFromItem(ctx.CurrentItem);
  33.  
  34. var listID = $getItemValue(ctx, 'ListID');
  35. var listItemID = $getItemValue(ctx, 'ListItemID');
  36. var ContentTypeId = $getItemValue(ctx, 'ContentTypeId');
  37.  
  38.  
  39.  
  40. var rowId = encodedId + "row";
  41. var editCellId = rowId + "_cell";
  42.  
  43. var currentItemIdx = ctx.CurrentItemIdx + 1;
  44. var alternating = currentItemIdx % 2 === 0 ? "ms-alternating" : "";
  45.  
  46.  
  47. if (currentItemIdx === 1) {
  48. _#-->
  49. <thead>
  50. <tr>
  51. <!--#_
  52. // Show the file icon
  53. _#-->
  54. <th class="ms-vh-icon ms-minWidthHeader">
  55. <img width="16" height="16" border="0" src="/_layouts/15/images/icgen.gif">
  56. </th>
  57. <!--#_
  58.  
  59. // Show the properties that aren't empty
  60. for(var i = 1; i <= 10; i++) {
  61. var property = $getItemValue(ctx, String.format("Property {0}", i));
  62. if(property.managedPropertyName !== String.format("Property {0}", i)) {
  63. var propertyName = typeof propertyNames[property.propertyLookupName] === "undefined" ? property.managedPropertyName : propertyNames[property.propertyLookupName];
  64. _#-->
  65. <th class="ms-vh2">
  66. _#= propertyName =#_
  67. </th>
  68. <!--#_
  69. }
  70. }
  71. _#-->
  72. </tr>
  73. </thead>
  74. <tbody>
  75. <!--#_
  76. }
  77. _#-->
  78. <tr id="_#= rowId =#_" class="_#= alternating =#_ ms-itmHoverEnabled ms-itmhover">
  79. <td class="ms-cellstyle ms-vb-icon">
  80. <!--#_ if(!iconURL.isEmpty) { _#-->
  81. <img src="_#= iconURL =#_" />
  82. <span id="_#= editCellId =#_"></span>
  83. <!--#_
  84. } else {
  85. _#-->
  86. <img width="16" height="16" border="0" src="/_layouts/15/images/icgen.gif">
  87. <!--#_
  88. }
  89. _#-->
  90. </td>
  91.  
  92. <!--#_
  93. // Show the properties that aren't empty
  94. for(var i = 1; i <= 10; i++) {
  95. var property = $getItemValue(ctx, String.format("Property {0}", i));
  96. _#-->
  97. <td class="ms-cellstyle ms-vb2">
  98. <!--#_
  99. if(!property.isEmpty)
  100. {
  101. var value = i === 1 ? String.format("<a href='{0}' class='ms-listlink'>{1}</a>", linkURL, property) : i === 5 ? String.format("<a href='{0}' class='ms-listlink'>{1}</a>", libraryLink, 'Library' ) : property;
  102.  
  103. _#-->
  104. _#= value =#_
  105. <!--#_
  106. if (i === 1 && !listID.isEmpty && !listItemID.isEmpty && !ContentTypeId.isEmpty) {
  107. var viewPropUrl = String.format('/_layouts/15/listform.aspx?ListId={0}&ID={1}&ContentTypeID={2}&Source={3}', listID, listItemID, ContentTypeId, window.location.href.split('#')[0]);
  108. _#-->
  109. &nbsp;&nbsp;
  110. <span title="Open Menu" class="NotificationDiv ms-ellipsis-a" rel="_#= viewPropUrl =#_" ref="_#= property =#_" path="_#= linkURL =#_" style="cursor: pointer; margin-top: 3px; float: right;">
  111. <img alt="Open Menu" src="/_layouts/15/images/spcommon.png" class="ms-ellipsis-icon">
  112. </span>
  113. <!--#_
  114. }
  115. }
  116. _#-->
  117. </td>
  118. <!--#_
  119. }
  120. _#-->
  121. </tr>
  122. <!--#_
  123. if (currentItemIdx === ctx.CurrentGroup.RowCount) {
  124. _#-->
  125. </tbody>
  126. <!--#_
  127. }
  128. _#-->
  129. </div>
  130. </body>
  131. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement