## Add lozenges for selected content types, making them closeable if the user can choose #set ($typeCloseable = false) #if ($show-content-types) #set ($typeCloseable = true) #end #if ($contentTypes) #set ($searchPages = $contentTypes.contains("page")) #set ($searchBlogposts = $contentTypes.contains("blogpost")) #set ($searchAttachments = $contentTypes.contains("attachment")) #set ($searchComments = $contentTypes.contains("comment")) #set ($searchSpaces = $contentTypes.contains("space")) #set ($searchUsers = $contentTypes.contains("user")) #end #if ($searchPages) $targetedSearch.auiLabelLozengeHTML("page", $searchCore.text("com.brikit.targetedsearch.content.page.name"), "selected-filter content-type", "data-filter-type='content-type'", $typeCloseable) #end #if ($searchBlogposts) $targetedSearch.auiLabelLozengeHTML("blogpost", $searchCore.text("com.brikit.targetedsearch.content.blogpost.name"), "selected-filter content-type", "data-filter-type='content-type'", $typeCloseable) #end #if ($searchAttachments) $targetedSearch.auiLabelLozengeHTML("attachment", $searchCore.text("com.brikit.targetedsearch.content.attachment.name"), "selected-filter content-type", "data-filter-type='content-type'", $typeCloseable) #end #if ($searchComments) $targetedSearch.auiLabelLozengeHTML("comment", $searchCore.text("com.brikit.targetedsearch.content.comment.name"), "selected-filter content-type", "data-filter-type='content-type'", $typeCloseable) #end #if ($searchSpaces) $targetedSearch.auiLabelLozengeHTML("space", $searchCore.text("com.brikit.targetedsearch.content.space.name"), "selected-filter content-type", "data-filter-type='content-type'", $typeCloseable) #end #if ($searchUsers) $targetedSearch.auiLabelLozengeHTML("user", $searchCore.text("com.brikit.targetedsearch.content.user.name"), "selected-filter content-type", "data-filter-type='content-type'", $typeCloseable) #end ## Add a lozenge for last modified, making it closeable if the user can choose #set ($lastCloseable = false) #if ($show-last-modified) #set ($lastCloseable = true) #end #if ($searchCore.isSet($lastModified)) #if ($lastModified == "LASTDAY" ) #set ($lastName = $searchCore.text("com.brikit.targetedsearch.last.modified.lastday.name")) #elseif ($lastModified == "LASTTWODAYS" ) #set ($lastName = $searchCore.text("com.brikit.targetedsearch.last.modified.lasttwodays.name")) #elseif ($lastModified == "LASTWEEK" ) #set ($lastName = $searchCore.text("com.brikit.targetedsearch.last.modified.lastweek.name")) #elseif ($lastModified == "LASTMONTH" ) #set ($lastName = $searchCore.text("com.brikit.targetedsearch.last.modified.lastmonth.name")) #elseif ($lastModified == "LASTSIXMONTHS" ) #set ($lastName = $searchCore.text("com.brikit.targetedsearch.last.modified.lastsixmonths.name")) #elseif ($lastModified == "LASTYEAR" ) #set ($lastName = $searchCore.text("com.brikit.targetedsearch.last.modified.lastyear.name")) #elseif ($lastModified == "LASTTWOYEARS" ) #set ($lastName = $searchCore.text("com.brikit.targetedsearch.last.modified.lasttwoyears.name")) #end $targetedSearch.auiLabelLozengeHTML($lastModified, $lastName, "selected-filter date-range", "data-filter-type='date-range'", $lastCloseable) #end ## Add lozenges for selected space categories, making them closeable if the user can choose #set ($categoryCloseable = false) #if ($show-content-types) #set ($categoryCloseable = true) #end #foreach ($spaceCategory in $searchScope) #set ($spaceLabel = $searchCore.capitalizeFirstLetter($spaceCategory)) $targetedSearch.auiLabelLozengeHTML($spaceLabel, $searchCore.text("com.brikit.targetedsearch.content.spaces.in.category", $spaceLabel), "selected-filter space-category", "data-filter-type='space-category'", $categoryCloseable) #end #foreach ($spaceKey in $spaceSearchScope) #set ($spaceName = $searchCore.getSpace($spaceKey).name) $targetedSearch.auiLabelLozengeHTML($spaceKey, $spaceName, "selected-filter space", "data-filter-type='space'", true) #end ## Add closeable lozenges for all the "additional" search filters #foreach ($additionalFilter in $additionalFilters) $targetedSearch.auiLabelLozengeHTML($additionalFilter, $additionalFilter, "selected-filter folksonomy", "data-filter-type='filter'", true) #end ## Add closeable lozenges for all the search filters (this covers the include-filters parameter in Targeted Search Field & Link macros) #foreach ($searchFilter in $searchFilters) $searchFilter.auiLabelLozengeHTML("selected-filter", "data-filter-type='filter'", true) #end ## Add closeable lozenges for all the folksonomy labels #foreach ($folksonomyLabel in $folksonomyLabels) $targetedSearch.auiLabelLozengeHTML($folksonomyLabel, $folksonomyLabel, "selected-filter folksonomy", "data-filter-type='filter'", true) #end