Created
August 28, 2015 06:50
-
-
Save marineko/a503f3bb3456bae9cf74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"> | |
<head> | |
<title>Blog Hover Panel</title> | |
<!--[if gte mso 9]><xml> | |
<mso:CustomDocumentProperties> | |
<mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden> | |
<mso:MasterPageDescription msdt:dt="string"></mso:MasterPageDescription> | |
<mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId> | |
<mso:TargetControlType msdt:dt="string">;#SearchHoverPanel;#</mso:TargetControlType> | |
<mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated> | |
<mso:ManagedPropertyMapping msdt:dt="string">'Title':'Title','AuthorOWSUSER':'AuthorOWSUSER','Path':'Path','Description':'Description','EditorOWSUSER':'EditorOWSUSER','LastModifiedTime':'LastModifiedTime','CollapsingStatus':'CollapsingStatus','DocId':'DocId','HitHighlightedSummary':'HitHighlightedSummary','HitHighlightedProperties':'HitHighlightedProperties','FileExtension':'FileExtension','ViewsLifeTime':'ViewsLifeTime','ParentLink':'ParentLink','FileType':'FileType','IsContainer':'IsContainer','SecondaryFileExtension':'SecondaryFileExtension','DisplayAuthor':'DisplayAuthor','DiscussionPost':'DiscussionPost','Created':'Created'</mso:ManagedPropertyMapping> | |
</mso:CustomDocumentProperties> | |
</xml><![endif]--> | |
</head> | |
<body> | |
<div id="Item_Blog_HoverPanel"> | |
<!--#_ | |
var postMaxLengthInChars = 500; | |
var i = 0; | |
var id = ctx.CurrentItem.id; | |
ctx.CurrentItem.csr_ShowViewLibrary = !Srch.U.isWebPage(ctx.CurrentItem.FileExtension); | |
if(ctx.CurrentItem.IsContainer) | |
{ | |
ctx.CurrentItem.csr_FileType = Srch.Res.ct_Folder | |
} | |
ctx.currentItem_ShowChangedBySnippet = true; | |
var userPersonaId = id + "_peopleUserPersona"; | |
var authorUsername = Srch.U.getUsernameFromAuthorField(ctx.CurrentItem.AuthorOWSUSER); | |
AddPostRenderCallback(ctx, function() | |
{ | |
Srch.SSU.renderPersona(authorUsername, userPersonaId); | |
}); | |
_#--> | |
<div class="ms-srch-hover-innerContainer ms-srch-hover-standardSize" id="_#= $htmlEncode(id + HP.ids.inner) =#_"> | |
<div class="ms-srch-hover-arrowBorder" id="_#= $htmlEncode(id + HP.ids.arrowBorder) =#_"></div> | |
<div class="ms-srch-hover-arrow" id="_#= $htmlEncode(id + HP.ids.arrow) =#_"></div> | |
<div class="ms-srch-hover-content" id="_#= $htmlEncode(id + HP.ids.content) =#_" data-displaytemplate="BlogHoverPanel"> | |
<div id="_#= $htmlEncode(id + HP.ids.header) =#_" class="ms-srch-hover-header"> | |
_#= ctx.RenderHeader(ctx) =#_ | |
</div> | |
<div id="_#= $htmlEncode(id + HP.ids.body) =#_" class="ms-srch-hover-body"> | |
<div class="ms-srch-hover-post"> | |
<div id="_#= $htmlEncode(userPersonaId) =#_" class="ms-srch-hover-postPersona"></div> | |
<div><p> | |
<h4> | |
<!--#_ | |
var author = ""; | |
if (!$isEmptyString(ctx.CurrentItem.AuthorOWSUSER)) | |
{ | |
author = Srch.U.getDisplayNameFromAuthorField(ctx.CurrentItem.AuthorOWSUSER); | |
} | |
_#--> | |
_#= $htmlEncode(author) =#_ | |
</h4></p> | |
<div class="ms-srch-hover-text ms-srch-hover-postText"> | |
_#= $htmlEncode(Srch.U.truncateEnd(ctx.CurrentItem.DiscussionPost, postMaxLengthInChars)) =#_ | |
</div> | |
<div class="ms-metadata"> | |
<!--#_ | |
if(!$isNull(ctx.CurrentItem.Created)) | |
{ | |
var timeSincePostId = id + "_timeSincePost"; | |
AddPostRenderCallback(ctx, function() | |
{ | |
Srch.U.renderFriendlyTimeIntervalString(ctx.CurrentItem.Created, timeSincePostId); | |
}); | |
_#--> | |
<span class="ms-srch-hover-dateMetadata" id="_#= $htmlEncode(timeSincePostId) =#_"></span> | |
<!--#_ | |
} | |
_#--> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div id="_#= $htmlEncode(id + HP.ids.actions) =#_" class="ms-srch-hover-actions"> | |
_#= ctx.RenderFooter(ctx) =#_ | |
</div> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment