Last active
August 29, 2015 13:56
-
-
Save chriswk/9046891 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
private void addPublishedFacetAndParameter() { | |
FieldParameterConfig fieldConfig = new FieldParameterConfig("periode", | |
"publisheddate", | |
Type.PERIODE, | |
Operator.GREATERTHAN_DAYSBACKWARD).withTagName("periode_tag"); | |
addFieldParameterConfig(fieldConfig); | |
PeriodFacetConfig publishedPeriodConfig = new PeriodFacetConfig("periode").withParameterConfig(fieldConfig) | |
.withQueries(Arrays.asList(new PeriodQuery(1, "Siste 24 timer"), | |
new PeriodQuery(3, "Siste 3 dager"), | |
new PeriodQuery(DAYS_IN_WEEK, "Sist uke"), | |
new PeriodQuery(DAYS_IN_MONTH, "Sist måned"))) | |
.withCustomQueryText("Siste %s dager") | |
.withExcludeTagName("periode_tag"); | |
addPeriodFacetConfig(publishedPeriodConfig); | |
} |
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
List<NavigatorConfig> .... = | |
new BasicNavigatorConfig("periode", StandardNavigatorTypes.PERIODE).withResets(NAVIGATOR_RESETS), | |
List<FilterSectionConfig ... = | |
new FilterSectionConfig("periode", "Publisert"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment