Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.38 KB | None | 0 0
  1. =========================
  2.  
  3. Title
  4.  
  5. Last Modified Date [LastModifiedTime]
  6.  
  7. Editor [EditorOWSUSER]
  8.  
  9. All access [ViewsLifeTime] Recent Access [ViewsLast3Days]
  10.  
  11. =========================
  12.  
  13. Blockquote
  14.  
  15. <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
  16. <head>
  17. <title>Customized Template</title>
  18.  
  19. <!--[if gte mso 9]><xml>
  20. <mso:CustomDocumentProperties>
  21. <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
  22. <mso:MasterPageDescription msdt:dt="string">This shows Title, Last Modified Date, Editor, All access and recent access for document. </mso:MasterPageDescription>
  23.  
  24. <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
  25. <mso:TargetControlType msdt:dt="string">;#SearchResults;#Content Web Parts;#</mso:TargetControlType>
  26. <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
  27.  
  28. <mso:ManagedPropertyMapping msdt:dt="string">'Title':'Title', 'EditorOWSUSER':EditorOWSUSER', 'LastModifiedTime:'LastModifiedTime', 'ViewsLifeTime':'ViewsLifeTime', 'ViewsLast3Days':'ViewsLast3Days','SecondaryFileExtension','ContentTypeId'
  29. </mso:ManagedPropertyMapping>
  30. <mso:HtmlDesignStatusAndPreview msdt:dt="string">https://[URL]/_catalogs/masterpage/Display Templates/Search/Item_Custom.html, 正常に変換されました。</mso:HtmlDesignStatusAndPreview>
  31. <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
  32. <mso:CrawlerXSLFile msdt:dt="string"></mso:CrawlerXSLFile>
  33. <mso:HtmlDesignPreviewUrl msdt:dt="string"></mso:HtmlDesignPreviewUrl>
  34. </mso:CustomDocumentProperties>
  35. </xml><![endif]-->
  36. </head>
  37. <body>
  38. <div id="Item_Custom">
  39.  
  40. <!--#_
  41.  
  42. //Get Title
  43. var title = ctx.CurrentItem.Title;
  44. var titleHtml = String.format('<a href="{0}" title="{1}" >{2}</a>', $urlHtmlEncode(ctx.CurrentItem.Path), $htmlEncode(title), $htmlEncode(title));
  45.  
  46. //Get Editor
  47. var editorHtml = "";
  48. if (!$isEmptyString(ctx.CurrentItem.EditorOWSUSER)){
  49. var editorIdentifiers = ctx.CurrentItem.EditorOWSUSER.split(" | ");
  50. if(!$isNull(editorIdentifiers[1]))
  51. {
  52. editorHtml = "Editor " + editorIdentifiers[1];
  53. }
  54. };
  55.  
  56.  
  57. //Get Last ModifiedTime
  58. var lastModifiedTime = ctx.CurrentItem.LastModifiedTime;
  59. var lastModifiedTimeHtml = "Last Modifed Date " + lastModifiedTime.getFullYear() + "年" + (lastModifiedTime.getMonth() + 1) + "月" + lastModifiedTime.getDate() +"日";
  60.  
  61. //Get ViesLifeTime
  62. var ViewsLifeTime = ctx.CurrentItem.ViewsLifeTime;
  63. var ViewsLifeTimeHtml = " All access " + ViewsLifeTime;
  64.  
  65.  
  66. //Get ViewsLast3Days
  67. var ViewsLast3Days = ctx.CurrentItem.ViewsLast3Days;
  68. var ViewsLast3DaysHtml = " Recent Access (" + ViewsLast3Days + " )";
  69.  
  70. _#-->
  71.  
  72.  
  73.  
  74.  
  75. <h3 class="ms-srch-ellipsis">_#=titleHtml=#_</h3><!-- Title -->
  76. <div> <span>_#=editorHtml=#_</span><!-- Editor --><br>
  77. <span>_#=lastModifiedTimeHtml=#_</span><!-- Last Modified Date --><br>
  78. <span>_#=ViewsLifeTimeHtml=#_</span><!-- All access -->
  79. <span>_#=ViewsLast3DaysHtml=#_</span><!-- Recent access -->
  80. </div>
  81.  
  82.  
  83. <!--#_
  84. if(!$isNull(ctx.CurrentItem) && !$isNull(ctx.ClientControl)){
  85. var id = ctx.ClientControl.get_nextUniqueId();
  86. var itemId = id + Srch.U.Ids.item;
  87. var hoverId = id + Srch.U.Ids.hover;
  88. var hoverUrl = "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_Default_HoverPanel.js";
  89. $setResultItem(itemId, ctx.CurrentItem);
  90. if(ctx.CurrentItem.IsContainer){
  91. ctx.CurrentItem.csr_Icon = Srch.U.getFolderIconUrl();
  92. }
  93. ctx.currentItem_ShowHoverPanelCallback = Srch.U.getShowHoverPanelCallback(itemId, hoverId, hoverUrl);
  94. ctx.currentItem_HideHoverPanelCallback = Srch.U.getHideHoverPanelCallback();
  95. _#-->
  96. <div id="_#= $htmlEncode(itemId) =#_" name="Item" data-displaytemplate="DefaultItem" class="ms-srch-item" onmouseover="_#= ctx.currentItem_ShowHoverPanelCallback =#_" onmouseout="_#= ctx.currentItem_HideHoverPanelCallback =#_">
  97. _#=ctx.RenderBody(ctx)=#_
  98. <div id="_#= $htmlEncode(hoverId) =#_" class="ms-srch-hover-outerContainer"></div>
  99. </div>
  100. <!--#_
  101. }
  102. _#-->
  103. </div>
  104. </body>
  105. </html>
  106.  
  107. <span ><img src="_#= ctx.CurrentItem.ProfilePhoto =#_" height="150px" width="150px" /></span><br/><br/>
  108.  
  109. <span ><img src="_#= ctx.CurrentItem.ProfilePhoto =#_" height="150px" width="150px" /></span><br/><br/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement