Commit 0c3bd510 authored by Ubbo Veentjer's avatar Ubbo Veentjer
Browse files

show 'active filters' checbox, active filters header only when needed. closes #40

parent f7de260d
Pipeline #135124 canceled with stages
in 4 minutes and 49 seconds
......@@ -6,11 +6,10 @@
<form class="tg search -header" action="/search">
<fieldset class="tg search_fake-input">
<div class="tg search_filter">
<!-- #set ($filterParam = $request.getParameter('filter'))
#if ( $filterParam )
<c:if test="${filter.size() > 0}">
<input class="tg search_checkbox" id="search-filters-active" type="checkbox" checked>
<label for="search-filters-active">#language('filters-active')</label>
#end -->
<label for="search-filters-active">${i18n['filters-active']}</label>
</c:if>
</div>
<div class="tg search_search">
......
......@@ -42,25 +42,27 @@
<h2 class="tgrep sidebar_heading">${i18n['filter']}</h2>
<section class="tgrep sidebar_panel">
<h3 class="tgrep sidebar_subheading">${i18n['active-filters']}</h3>
<ul class="tgrep sidebar_list">
<c:forEach items="${filter}" var="activeFilter">
<c:set var="afArray" value="${fn:split(activeFilter, ':')}" />
<li class="tgrep sidebar_item -filter" data-filter="${activeFilter}">
<a class="tgrep sidebar_remove-filter"
title="${i18n['remove-filter']}"
href="?query=${query}&order=${order}&limit=${limit}${fn:replace(filterQueryString, '&filter='.concat(afArray[0]).concat('%3A').concat(utils:urlencode(afArray[1])) , '')}">
<span class="sr-only">${i18n['remove-filter']}</span>
</a>
<strong>${i18n[afArray[0]]}</strong>: ${afArray[1]}
</li>
</c:forEach>
</ul>
<c:if test="${filter.size() > 6}">
<button class="tgrep sidebar_expand">${i18n['expand']}</button>
</c:if>
</section>
<c:if test="${filter.size() > 0}">
<section class="tgrep sidebar_panel">
<h3 class="tgrep sidebar_subheading">${i18n['active-filters']}</h3>
<ul class="tgrep sidebar_list">
<c:forEach items="${filter}" var="activeFilter">
<c:set var="afArray" value="${fn:split(activeFilter, ':')}" />
<li class="tgrep sidebar_item -filter" data-filter="${activeFilter}">
<a class="tgrep sidebar_remove-filter"
title="${i18n['remove-filter']}"
href="?query=${query}&order=${order}&limit=${limit}${fn:replace(filterQueryString, '&filter='.concat(afArray[0]).concat('%3A').concat(utils:urlencode(afArray[1])) , '')}">
<span class="sr-only">${i18n['remove-filter']}</span>
</a>
<strong>${i18n[afArray[0]]}</strong>: ${afArray[1]}
</li>
</c:forEach>
</ul>
<c:if test="${filter.size() > 6}">
<button class="tgrep sidebar_expand">${i18n['expand']}</button>
</c:if>
</section>
</c:if>
<c:forEach items="${facets}" var="facetGroup">
<c:if test="${facetGroup.facet.size() != 0}">
......
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