|
2 | 2 | <#import "search-lib.ftl" as sl>
|
3 | 3 |
|
4 | 4 | <#-- <#assign additionalFilters = ["type"]> -->
|
5 |
| -<#if filterGenericInfo.filters[searchFilter]??> |
| 5 | +<#if filters[searchFilter]??> |
6 | 6 |
|
7 | 7 | <script>
|
8 | 8 | let searchFormId = "filter-form";
|
|
34 | 34 | </#list>
|
35 | 35 | <@filterTab searchFilter />
|
36 | 36 | <#else>
|
37 |
| - <@filterFacets filterGenericInfo.filters[searchFilter] /> |
| 37 | + <@filterFacets filters[searchFilter] /> |
38 | 38 | </#if>
|
39 | 39 | </ul>
|
40 | 40 | <@alphabeticalIndexLinks />
|
|
63 | 63 | </#if>
|
64 | 64 |
|
65 | 65 | <#macro filterTab filterId>
|
66 |
| - <#if filterGenericInfo.filters[filterId]?? > |
67 |
| - <#assign filter = filterGenericInfo.filters[filterId] > |
| 66 | + <#if filters[filterId]?? > |
| 67 | + <#assign filter = filters[filterId] > |
68 | 68 | <#if filter.display >
|
69 |
| - <#assign filterValues><@getValues filter filterId /></#assign> |
| 69 | + <#assign filterValues><@getValues filter /></#assign> |
70 | 70 | <#if filterValues?has_content>
|
71 | 71 | <li class="filter-tab">
|
72 | 72 | <a href="#">${filter.name?html}</a>
|
|
77 | 77 | </#if>
|
78 | 78 | </#macro>
|
79 | 79 |
|
80 |
| -<#macro getValues filter filterId> |
| 80 | +<#macro getValues filter> |
81 | 81 | <#if filter.type == "RangeFilter">
|
82 | 82 | <ul class="facet-values">
|
83 |
| - <#if filters[filterId]?? && filters[filterId].selected> |
| 83 | + <#if filter.selected> |
84 | 84 | <li class="li-selected">
|
85 | 85 | <a href="#" class="selected">
|
86 |
| - <@sl.userSelectedInput filters[filterId] "filter-form" /> |
| 86 | + <@sl.userSelectedInput filter "filter-form" /> |
87 | 87 | </a>
|
88 | 88 | </li>
|
89 | 89 | </#if>
|
90 |
| - <li <#if filter.selected || (filters[filterId]?? && filters[filterId].selected)> class="li-selected" </#if>> |
91 |
| - <@sl.rangeFilter filters[filterId] 'filter-form'/> |
| 90 | + <li <#if filter.selected> class="li-selected" </#if>> |
| 91 | + <@sl.rangeFilter filter 'filter-form'/> |
92 | 92 | </li>
|
93 | 93 | </ul>
|
94 | 94 | <#else>
|
|
120 | 120 | <#continue>
|
121 | 121 | </#if>
|
122 | 122 | <#assign valueLabel = value.name >
|
123 |
| - <#assign resultsCount = getCurrentCount(f value) > |
| 123 | + <#assign resultsCount = value.count > |
124 | 124 | <#if !(valueLabel?has_content)>
|
125 | 125 | <#assign valueLabel = value.id >
|
126 | 126 | </#if>
|
127 | 127 | <#if value.selected>
|
128 |
| - <li id="${value.id?html}" class="li-selected"> |
129 |
| - <a href="#" class="selected"> |
130 |
| - <@sl.getInput f value sl.getValueID(f.id, idCounter) idCounter 'filter-form' /> |
131 |
| - <@sl.getSelectedLabel sl.getValueID(f.id, idCounter)?html value f resultsCount /> |
132 |
| - </a> |
133 |
| - </li> |
| 128 | + <#if value.id != "[* TO *]"> |
| 129 | + <li id="${value.id?html}" class="li-selected"> |
| 130 | + <a href="#" class="selected"> |
| 131 | + <@sl.getInput f value sl.getValueID(f.id, idCounter) idCounter 'filter-form' /> |
| 132 | + <@sl.getSelectedLabel sl.getValueID(f.id, idCounter)?html value f resultsCount /> |
| 133 | + </a> |
| 134 | + </li> |
| 135 | + </#if> |
134 | 136 | <#else>
|
135 | 137 | <#if resultsCount != 0>
|
136 | 138 | <li id="${value.id?html}">
|
|
145 | 147 | </#list>
|
146 | 148 | </#macro>
|
147 | 149 |
|
148 |
| -<#function getCurrentCount f v> |
149 |
| - <#if filters[f.id]??> |
150 |
| - <#assign filter = filters[f.id]> |
151 |
| - <#if filter.values[v.id]??> |
152 |
| - <#return filter.values[v.id].count > |
153 |
| - <#else> |
154 |
| - <#return 0 /> |
155 |
| - </#if> |
156 |
| - <#else> |
157 |
| - <#return 0 /> |
158 |
| - </#if> |
159 |
| -</#function> |
160 |
| - |
161 | 150 | <#macro alphabeticalIndexLinks>
|
162 | 151 | <#if languageAware >
|
163 | 152 | <#assign indexFilterName = "label_regex">
|
164 | 153 | <#else>
|
165 | 154 | <#assign indexFilterName = "raw_label_regex">
|
166 | 155 | </#if>
|
167 |
| - <#if filterGenericInfo.filters[indexFilterName]??> |
168 |
| - <#assign indexFilter = filterGenericInfo.filters[indexFilterName]> |
| 156 | + <#if filters[indexFilterName]??> |
| 157 | + <#assign indexFilter = filters[indexFilterName]> |
169 | 158 | <nav id="alpha-browse-container" role="navigation">
|
170 | 159 | <ul id="alpha-browse-individuals">
|
171 | 160 | <li>
|
|
0 commit comments