Commit 29bef3ad authored by Jens Jacobsen's avatar Jens Jacobsen

Add solr age facet

parent b05418ad
Pipeline #2011 passed with stages
in 1 minute and 24 seconds
......@@ -45,6 +45,43 @@ plugin.tx_solr.search {
itemClass = info
prefix = #
}
age {
label = Extensions updated
partialName = OptionsAge
field = extensionLastUpload_tDateS
itemClass = primary
type = queryGroup
queryGroup {
week {
query = [NOW/DAY-7DAYS TO *]
}
month {
query = [NOW/DAY-1MONTH TO NOW/DAY-7DAYS]
}
halfYear {
query = [NOW/DAY-6MONTHS TO NOW/DAY-1MONTH]
}
year {
query = [NOW/DAY-1YEAR TO NOW/DAY-6MONTHS]
}
}
renderingInstruction = CASE
renderingInstruction {
key.field = optionValue
week = TEXT
week.value = Less than one week ago
month = TEXT
month.value = 1 week to 1 month ago
halfYear = TEXT
halfYear.value = 1 to 6 months ago
year = TEXT
year.value = 6 months to 1 year ago
}
}
}
}
}
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
data-namespace-typo3-fluid="true"
>
<div class="card-header">
<span class="facet-label">{facet.label}</span>
</div>
<div class="card-block">
<div class="facet-option-list facet-type-options fluidfacet" data-facet-name="{facet.name}" data-facet-label="{facet.label}">
<f:for each="{facet.options}" as="option" iteration="iteration">
<a class="btn btn-outline-{facet.configuration.itemClass} mb-1 mr-1 facet solr-ajaxified" href="{s:uri.facet.addFacetItem(facet: facet, facetItem: option)}">
<strong>
{facet.configuration.prefix}{option.label}
<span class="badge badge-{facet.configuration.itemClass}">{option.documentCount}</span>
</strong>
</a>
</f:for>
</div>
</div>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment