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
<#-- SORT MODES --> | |
<div class="dropdown pull-right"> | |
<a class="dropdown-toggle text-muted" data-toggle="dropdown" href="#" id="dropdown-sortmode" title="Sort"> | |
<small><span class="glyphicon glyphicon-sort"></span> Sort</small> | |
</a> | |
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdown-sortmode"> | |
<li role="menuitem"><a href="${question.collection.configuration.value("ui.modern.search_link")}?${removeParam(QueryString,["start_rank","sort"])?html}"><span class="glyphicon glyphicon-sort-by-attributes-alt"></span> Relevance</a></li> | |
<li role="menuitem"><a href="${question.collection.configuration.value("ui.modern.search_link")}?${removeParam(QueryString,["start_rank","sort"])?html}&sort=date"><span class="glyphicon glyphicon-sort-by-order-alt"></span> Recency</a></li> | |
<li role="menuitem"><a href="${question.collection.configuration.value("ui.modern.search_link")}?${removeParam(QueryString,["start_rank","sort"])?html}&sort=title"><span class="glyphicon glyphicon-sort-by-a |
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
<#-- FACEBOOK RESULT TYPE --> | |
<div class="row"> | |
<div class="col-md-1"> | |
<img class="search-thumbnail" src=""/> | |
</div> | |
<div class="col-md-11"> | |
<#-- PAGE RESULT SUB-TYPE --> | |
<#if s.result.metaData["T"] == "PAGE"> | |
<h4><a href="${s.result.clickTrackingUrl?html}" title="${s.result.title}">${s.result.metaData["a"]}</a></h4> |
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
<#-- TWITTER RESULT TYPE --> | |
<#-- TWEET OWNER --> | |
<div class="media"> | |
<a class="pull-left" href="#"> | |
<img class="media-object" src="/s/scale?url=${s.result.metaData["I"]}&width=50&height=50" alt="avatar"> | |
</a> | |
<div class="media-body twitter-owner"> | |
<h4 class="media-heading"><a href="http://twitter.com/${s.result.metaData["u"]}" target="_blank" title="(@${s.result.metaData["u"]})">${s.result.metaData["a"]}</a></h4> | |
<small class="text-muted" >@${s.result.metaData["u"]}</small> | |
</div> |
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
<#--- Checks if a query blending occurred and provide a link to cancel it. | |
@param prefix : Prefix to blended query terms, defaults to "Your query has been expanded to: ". | |
@param linkText : Text for the link to cancel query blending, defaults to "Click here to use verbatim query". | |
--> | |
<#macro CheckBlending prefix="Your query has been expanded to: " linkText="Do not do this"> | |
<#if response?? && response.resultPacket?? | |
&& response.resultPacket.QSups?? && response.resultPacket.QSups?size > 0> | |
${prefix} <span><#list response.resultPacket.QSups as qsup> ${qsup.query}<#if qsup_has_next>, </#if></#list></span>. | |
<a href="?${QueryString}&qsup=off">${linkText}</a> | |
</#if> |
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
// Expandable facet categories and Bootstrap styling. | |
// Assumes use of bootstrap-search.ftl and non-hierarchical facets | |
function expandable_facet_categories(defaultFacetCategories) { | |
$(".facet .panel ul").each(function(){ | |
if ($(this).children(".category").size() > defaultFacetCategories) { | |
$(this).children(".category").each(function(){ | |
if($(this).index() >= defaultFacetCategories) | |
$(this).hide(); | |
}); | |
$(this).after("<button type='button' class='btn btn-link btn-xs search-toggle-more-categories' title='Show more categories from this facet'><small><span class='glyphicon glyphicon-chevron-down'></span></small> More…</button>"); |
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
<@s.AfterSearchOnly> | |
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'GOOGLE-ANALYTICS-UA']); | |
<#if response.resultPacket.resultsSummary.totalMatching == 0> | |
<#-- TRACK QUERIES WITH ZERO RESULTS --> | |
_gaq.push(['_setCustomVar', 1, 'No matching results', '<@s.QueryClean/>', 3]); | |
<#else> | |
<#if response.resultPacket.resultsSummary.fullyMatching == 0> |