Commit 8752f1bf authored by Alexander Basov's avatar Alexander Basov Committed by Matija Obreza
Browse files

Feature #26151 Specifying columns to include in accession list /explore

parent b3d9dc34
......@@ -21,6 +21,8 @@ package org.genesys2.server.model.json;
*/
public interface Api1Constants {
public static interface Accession {
public static final String CROPE_NAME = "cropName";
/**
* WIEWS code of accession holding institute.
*/
......@@ -183,10 +185,12 @@ public interface Api1Constants {
*/
public static final String ACCEURL = "acceUrl";
public static final String SCIENTIFIC_NAME = "scientificName";
}
public static interface Collecting {
public static final String MISSION_ID = "collectingMissionID";
/**
* Corresponds to COLLDATE
*/
......@@ -230,6 +234,7 @@ public interface Api1Constants {
public static interface Geo {
public static final String LATITUDE_LONGITUDE = "latitudeAndLongitude";
/**
* Latitude
*/
......
......@@ -57,17 +57,20 @@ import org.springframework.data.domain.Pageable;
public interface GenesysService {
/**
* Return the number of active ({@link Accession#historic} == false) accession records
* Return the number of active ({@link Accession#historic} == false)
* accession records
*/
long countByInstitute(FaoInstitute institute);
/**
* Return the number of active ({@link Accession#historic} == false) accession records
* Return the number of active ({@link Accession#historic} == false)
* accession records
*/
long countByOrigin(Country country);
/**
* Return the number of active ({@link Accession#historic} == false) accession records
* Return the number of active ({@link Accession#historic} == false)
* accession records
*/
long countByLocation(Country country);
......@@ -131,7 +134,7 @@ public interface GenesysService {
void updateAccessionInstitueRefs();
List<Accession> saveAccessions(FaoInstitute institute, List<Accession> matching);
List<SvalbardData> saveSvalbards(List<SvalbardData> svalbards);
long countAvailableForDistribution(Set<Long> accessionIds);
......@@ -139,7 +142,7 @@ public interface GenesysService {
Set<Long> filterAvailableForDistribution(Set<Long> accessionIds);
AccessionData saveAccession(AccessionData accession);
List<Accession> saveAccessions(Iterable<Accession> accession);
void updateAccessionCount(FaoInstitute institute);
......@@ -171,7 +174,7 @@ public interface GenesysService {
List<AccessionGeo> listAccessionsGeo(Set<Long> copy);
List<AccessionHistoric> removeAccessions(FaoInstitute institute, List<Accession> toDelete);
void setInSvalbard(List<Accession> matching);
void addAccessions(List<Accession> accessions);
......@@ -210,6 +213,10 @@ public interface GenesysService {
List<Long> listAccessionsIds(Taxonomy2 taxonomy);
List<String> columnsForDisplay();
List<String> defaultViewColumns();
public static class AllStuff {
public AllStuff(long id) {
this.id = id;
......
......@@ -72,6 +72,7 @@ import org.genesys2.server.model.impl.Country;
import org.genesys2.server.model.impl.Crop;
import org.genesys2.server.model.impl.FaoInstitute;
import org.genesys2.server.model.impl.Organization;
import org.genesys2.server.model.json.Api1Constants;
import org.genesys2.server.persistence.domain.AccessionAliasRepository;
import org.genesys2.server.persistence.domain.AccessionBreedingRepository;
import org.genesys2.server.persistence.domain.AccessionCollectRepository;
......@@ -1068,8 +1069,7 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
zos.putNextEntry(metaEntry);
final BufferedWriter osw = new BufferedWriter(new OutputStreamWriter(zos));
osw.write("<?xml version='1.0' encoding='utf-8'?>\n");
osw.write(
"<archive xmlns=\"http://rs.tdwg.org/dwc/text/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://rs.tdwg.org/dwc/text/ http://rs.tdwg.org/dwc/text/tdwg_dwc_text.xsd\">\n");
osw.write("<archive xmlns=\"http://rs.tdwg.org/dwc/text/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://rs.tdwg.org/dwc/text/ http://rs.tdwg.org/dwc/text/tdwg_dwc_text.xsd\">\n");
osw.write("<core encoding=\"UTF-8\" fieldsTerminatedBy=\",\" linesTerminatedBy=\"\\n\" fieldsEnclosedBy=\"&quot;\" ignoreHeaderLines=\"0\">\n");
osw.write("\t<files><location>core.csv</location></files>\n");
osw.write("\t<id index=\"0\" />\n");
......@@ -1336,8 +1336,7 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
zos.putNextEntry(metaEntry);
final BufferedWriter osw = new BufferedWriter(new OutputStreamWriter(zos));
osw.write("<?xml version='1.0' encoding='utf-8'?>\n");
osw.write(
"<archive xmlns=\"http://rs.tdwg.org/dwc/text/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://rs.tdwg.org/dwc/text/ http://rs.tdwg.org/dwc/text/tdwg_dwc_text.xsd\">\n");
osw.write("<archive xmlns=\"http://rs.tdwg.org/dwc/text/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://rs.tdwg.org/dwc/text/ http://rs.tdwg.org/dwc/text/tdwg_dwc_text.xsd\">\n");
osw.write("<core encoding=\"UTF-8\" fieldsTerminatedBy=\",\" linesTerminatedBy=\"\\n\" fieldsEnclosedBy=\"&quot;\" ignoreHeaderLines=\"0\">\n");
osw.write("\t<files><location>core.csv</location></files>\n");
osw.write("\t<id index=\"0\" />\n");
......@@ -1349,8 +1348,7 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
for (int i = 0; i < metadataMethods.size(); i++) {
final Method method = metadataMethods.get(i);
osw.write(
"<extension encoding=\"UTF-8\" fieldsTerminatedBy=\",\" linesTerminatedBy=\"\\n\" fieldsEnclosedBy=\"&quot;\" ignoreHeaderLines=\"0\">\n");
osw.write("<extension encoding=\"UTF-8\" fieldsTerminatedBy=\",\" linesTerminatedBy=\"\\n\" fieldsEnclosedBy=\"&quot;\" ignoreHeaderLines=\"0\">\n");
osw.write("\t<files><location>");
osw.write(method.getFieldName().toLowerCase());
osw.write(".csv</location></files>\n");
......@@ -1531,6 +1529,29 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
return toRemove;
}
@Override
public List<String> columnsForDisplay() {
List<String> columnList = new ArrayList<>();
columnList.add(Api1Constants.Accession.GENUS);
columnList.add(Api1Constants.Accession.SPECIES);
columnList.add(Api1Constants.Accession.SUBTAXA);
columnList.add(Api1Constants.Accession.CROPE_NAME);
columnList.add(Api1Constants.Geo.LATITUDE_LONGITUDE);
columnList.add(Api1Constants.Collecting.MISSION_ID);
return columnList;
}
@Override
public List<String> defaultViewColumns() {
List<String> columnList = new ArrayList<>();
columnList.add(Api1Constants.Accession.ACCENUMB);
columnList.add(Api1Constants.Accession.SCIENTIFIC_NAME);
columnList.add(Api1Constants.Accession.ORIGCTY);
columnList.add(Api1Constants.Accession.SAMPSTAT);
columnList.add(Api1Constants.Accession.INSTCODE);
return columnList;
}
@Override
public List<Long> listAccessionsIds(Taxonomy2 taxonomy) {
return accessionRepository.listAccessionsIds(taxonomy);
......
/**
* Copyright 2015 Global Crop Diversity Trust
*
* <p/>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......@@ -25,10 +25,13 @@ import java.io.IOException;
import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import javax.imageio.ImageIO;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.ArrayUtils;
......@@ -65,6 +68,7 @@ import org.springframework.http.MediaType;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
......@@ -142,15 +146,31 @@ public class ExplorerController extends BaseController {
/**
* Browse all
*
*
* @param model
* @param page
* @return
* @throws IOException
*/
@RequestMapping("/explore")
public String viewFiltered(ModelMap model, @RequestParam(value = "page", required = false, defaultValue = "1") int page,
@RequestParam(value = "filter", required = true, defaultValue = "{}") String jsonFilter) throws IOException {
public String viewFiltered(HttpServletResponse response, ModelMap model, @RequestParam(value = "page", required = false, defaultValue = "1") int page,
@RequestParam(value = "filter", required = true, defaultValue = "{}") String jsonFilter,
@RequestParam(value = "columns", required = true, defaultValue = "") String columns,
@CookieValue(value = "columns", defaultValue = "") String cookieColumns) throws IOException {
if (columns != null && !columns.isEmpty()) {
String columnsForCookie = "";
for (String clmn : Arrays.asList(columns.split(","))) {
columnsForCookie += clmn + ",";
}
columnsForCookie = !columnsForCookie.isEmpty() && columnsForCookie.substring(columnsForCookie.length() - 1).equals(",") ? columnsForCookie
.substring(0, columnsForCookie.length() - 1) : columnsForCookie;
Cookie cookie = new Cookie("columns", columnsForCookie);
response.addCookie(cookie);
model.addAttribute("selectedColumns", columnsForCookie.isEmpty() ? Collections.emptyList() : Arrays.asList(columnsForCookie.split(",")));
} else if (!cookieColumns.isEmpty()) {
model.addAttribute("selectedColumns", Arrays.asList(cookieColumns.split(",")));
}
String[] selectedFilters = null;
......@@ -187,6 +207,8 @@ public class ExplorerController extends BaseController {
_logger.info("Got: " + accessions);
model.addAttribute("defaultColumns", genesysService.defaultViewColumns());
model.addAttribute("availableColumns", genesysService.columnsForDisplay());
model.addAttribute("crops", cropService.list(getLocale()));
model.addAttribute("pagedData", accessions);
model.addAttribute("appliedFilters", appliedFilters);
......@@ -198,7 +220,7 @@ public class ExplorerController extends BaseController {
/**
* Browse all using Elasticsearch
*
*
* @param model
* @param page
* @return
......@@ -401,7 +423,7 @@ public class ExplorerController extends BaseController {
/**
* Change color of the tile
*
*
* @param color
* @param imageBytes
* @return
......@@ -477,8 +499,8 @@ public class ExplorerController extends BaseController {
}
@RequestMapping(value = "/explore/overview")
public String overview(ModelMap model, @RequestParam(value = "filter", required = false, defaultValue = "{}") String jsonFilter)
throws IOException, SearchException {
public String overview(ModelMap model, @RequestParam(value = "filter", required = false, defaultValue = "{}") String jsonFilter) throws IOException,
SearchException {
AppliedFilters appliedFilters = mapper.readValue(jsonFilter, AppliedFilters.class);
String[] selectedFilters = appliedFilters.getFilterNames();
......@@ -538,12 +560,13 @@ public class ExplorerController extends BaseController {
@RequestMapping(value = "/explore/shorten-url", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public Object getBriefURL(@RequestParam(value = "filter", required = false, defaultValue = "") String jsonFilter,
@RequestParam(value = "page", required = false, defaultValue = "1") int page) throws IOException, URISyntaxException {
@RequestParam(value = "page", required = false, defaultValue = "1") int page, @CookieValue(value = "columns") String columns) throws IOException,
URISyntaxException {
AppliedFilters appliedFilters = mapper.readValue(jsonFilter, AppliedFilters.class);
URI longUrl = new URIBuilder(baseUrl).setPath("/explore").addParameter("filter", appliedFilters.toString()).addParameter("page", Integer.toString(page))
.build();
URI longUrl = new URIBuilder(baseUrl).setPath("/explore").addParameter("filter", appliedFilters.toString())
.addParameter("page", Integer.toString(page)).addParameter("columns", columns).build();
final String shortenedUrl = urlShortenerService.shortenUrl(longUrl.toURL());
......
......@@ -17,11 +17,13 @@
package org.genesys2.server.servlet.controller;
import java.text.DateFormatSymbols;
import java.util.List;
import java.util.Locale;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.RandomUtils;
import org.genesys2.server.exception.UserException;
import org.genesys2.server.model.genesys.Accession;
import org.genesys2.server.model.impl.Country;
import org.genesys2.server.model.impl.Crop;
import org.genesys2.server.model.impl.User;
......@@ -38,23 +40,23 @@ import com.fasterxml.jackson.databind.ObjectMapper;
@Component
public class JspHelper {
private static final String regExpr="[^\\w]+";
private static final String regExpr = "[^\\w]+";
private static final String delimiter="-";
@Autowired
private static final String delimiter = "-";
@Autowired
private UserService userService;
@Autowired
@Autowired
private GeoService geoService;
@Autowired
@Autowired
private CropService cropService;
@Autowired
@Autowired
private ObjectMapper objectMapper;
@Autowired
@Autowired
private HtmlConverter htmlConverter;
public String userFullName(Long userId) {
......@@ -84,6 +86,10 @@ public class JspHelper {
return cropService.getCrop(shortName);
}
public List<Crop> getCropsByAccession(Accession accession) {
return cropService.getCrops(accession.getTaxonomy());
}
public String toJson(Object object) throws JsonProcessingException {
return objectMapper.writer().writeValueAsString(object);
}
......
......@@ -332,6 +332,7 @@ accession.availability.false=Not available
accession.historic.true=Historic
accession.historic.false=Active
accession.acceUrl=Additional accession URL
accession.scientificName=Scientific name
accession.page.profile.title=Accession profile: {0}
accession.page.resolve.title=Multiple accessions found
......@@ -369,6 +370,7 @@ selection.add-many.button=Add to selection list
savedmaps=Remember current map
savedmaps.list=Map list
savedmaps.save=Remember map
taxonomy.subtaxa=Subtaxa
filter.enter.title=Enter filter title
filters.page.title=Data filters
......@@ -423,6 +425,20 @@ filter.internal.message.more=More than {0}
filter.internal.message.less=Less than {0}
filter.lists=Listed on accession list
columns.add=View
columns.applay=Applay
columns.genus=Genus
columns.species=Species
columns.subtaxa=Subtaxa
columns.cropName=Crop name
columns.latitudeAndLongitude=Latitude & Longitude
columns.collectingMissionID=Collecting mission ID
columns.acceNumb=Accession number
columns.scientificName=Scientific name
columns.orgCty=Country of origin
columns.sampStat=Biological status of accession
columns.instCode=Holding institute
search.page.title=Full-text Search
search.no-results=No matches found for your query.
......
<!DOCTYPE html>
<%@include file="/WEB-INF/jsp/init.jsp"%>
<%@include file="/WEB-INF/jsp/init.jsp" %>
<spring:message code='filter.internal.message.between' var="between" arguments=" "/>
<spring:message code='filter.internal.message.and' var="varEnd" arguments=" "/>
<spring:message code='filter.internal.message.more' var="moreThan" arguments=" "/>
......@@ -12,450 +12,621 @@
<html>
<head>
<title><spring:message code="accession.page.data.title" /></title>
<title><spring:message code="accession.page.data.title"/></title>
</head>
<body>
<cms:informative-h1 title="accession.page.data.title" fancy="${pagedData.number eq 0}" info="accession.page.data.intro" />
<%--Dropdown filters--%>
<div class="main-col-header clearfix">
<div class="nav-header">
<div class="results">
<spring:message code="accessions.number" arguments="${pagedData.totalElements}" />
</div>
<div class="row">
<div class="col-md-12 col-lg-5">
<form method="get" action="">
<input type="hidden" name="filter" value="<c:out value="${jsonFilter}" />" />
<div class="pagination">
<spring:message code="paged.pageOfPages" arguments="${pagedData.number+1},${pagedData.totalPages}" />
<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number eq 0 ? 1 : pagedData.number}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.previous-page" /></a>
<input class="form-control" style="display: inline; max-width: 5em; text-align: center" type="text" name="page" placeholder="${pagedData.number + 1}" />
<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number+2}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message code="pagination.next-page" /></a>
</div>
</form>
</div>
<div class="col-md-12 col-lg-7 text-right" style="padding-top: 12px">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="menuShareLink">
<span class="glyphicon glyphicon-share"></span><span><spring:message code="share.link"/></span> <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li class="padding10">
<p><spring:message code="share.link.text" /></p>
<input id="shortLink" type="text" placeholder="<spring:message code="share.link.placeholder" />" value="" />
</li>
</ul>
</div>
<c:if test="${pagedData.totalElements le 200000}">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-download"></span><span><spring:message code="download"/></span> <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<security:authorize access="isAuthenticated()">
<li>
<form style="display: inline-block" method="post" action="<c:url value="/download/explore/download/mcpd" />">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
<input type="hidden" name="filter" value="<c:out value="${jsonFilter}" />" />
<button class="btn btn-inline" type="submit"><span><spring:message code="filter.download-mcpd" /></span></button>
</form>
</li>
</security:authorize>
<li>
<form style="display: inline-block" method="post" action="<c:url value="/download/explore/dwca" />">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
<input type="hidden" name="filter" value="<c:out value="${jsonFilter}" />" />
<button class="btn btn-inline" type="submit"><span><spring:message code="filter.download-dwca" /></span></button>
</form>
</li>
</ul>
</div>
</c:if>
<a class="btn btn-default" href="<c:url value="/explore/overview"><c:param name="filter">${jsonFilter}</c:param></c:url>"><span class="glyphicon glyphicon-eye-open"></span><span><spring:message code="data-overview.short" /></span></a>
<a class="btn btn-default" href="<c:url value="/explore/map"><c:param name="filter">${jsonFilter}</c:param></c:url>"><span class="glyphicon glyphicon-globe"></span><span><spring:message code="maps.view-map" /></span></a>
</div>
</div>
</div>
</div>
<%--Filters--%>
<div id="toggleFilters" class="applied-filters ${pagedData.number eq 0 ? 'hide' : ''}">
<ul class="nav nav-pills">
<li class="active filter-toggler"><a><spring:message code="filters.toggle-filters" /></a></li>
<li class="message">
<span class="${fn:length(currentFilters) gt 0 ? '' : 'hide'}"><spring:message code="filter.filters-applied" /></span>
<span class="${fn:length(currentFilters) gt 0 ? 'hide' : ''}"><spring:message code="filter.filters-not-applied" /></span>
</li>
</ul>
</div>
<div id="allfilters" class="applied-filters ${pagedData.number gt 0 ? 'hide' : ''}">
<ul class="nav nav-pills">
<li class="filter-toggler"><a><spring:message code="filters.toggle-filters" /></a></li>
<li class="active dropdown form-horizontal" id="menu1">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<spring:message code="filter.add"/>
<b class="glyphicon-plus"></b>
</a>
<ul class="dropdown-menu">
<c:forEach items="${availableFilters}" var="filter">
<li><a href="#" i-key="${filter.key}" class="filter-enable">
<spring:message code="filter.${filter.key}"/></a></li>
</c:forEach>
</ul>
</li>
<li class="dropdown form-horizontal" id="menu2" style="display: none">
<a class="" data-toggle="modal" data-target="#myModal">
<spring:message code="filter.additional"/>
<b class="glyphicon-plus"></b>
</a>
</li>
<li class="message">
<span class="${fn:length(currentFilters) gt 0 ? '' : 'hide'}"><spring:message code="filter.filters-applied" /></span>
<span class="${fn:length(currentFilters) gt 0 ? 'hide' : ''}"><spring:message code="filter.filters-not-applied" /></span>
</li>
</ul>
<%-- Only render currently present filters --%>
<c:forEach items="${currentFilters}" var="filter">
<c:set var="normalizedKey" value="${filter.key.replace('.', '-').replace(':', '_')}"/>
<c:set var="appliedFilter" value="${appliedFilters.get(filter.key)}" />
<div class="clearfix filter-block" id="<c:out value="${normalizedKey}" />_filter" norm-key="<c:out value="${normalizedKey}" />" i-key="<c:out value="${filter.key}" />">
<div class="col-lg-3 edit-fil">
<c:if test="${not filter.core}">
<c:out value="${filter.title}" />
<%-- <a href="<c:url value="/descriptors/${filter.key}" />"> --%>
</c:if>
<c:if test="${filter.core}">
<spring:message code="filter.${filter.key}" />
</c:if>
<cms:informative-h1 title="accession.page.data.title" fancy="${pagedData.number eq 0}"
info="accession.page.data.intro"/>
<%--Dropdown filters--%>
<div class="main-col-header clearfix">
<div class="nav-header">
<div class="results">
<spring:message code="accessions.number" arguments="${pagedData.totalElements}"/>
</div>
<div class="row">
<div class="col-md-12 col-lg-5">
<form method="get" action="">
<input type="hidden" name="filter" value="<c:out value="${jsonFilter}" />"/>
<div class="pagination">
<spring:message code="paged.pageOfPages"
arguments="${pagedData.number+1},${pagedData.totalPages}"/>
<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number eq 0 ? 1 : pagedData.number}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message
code="pagination.previous-page"/></a>
<input class="form-control" style="display: inline; max-width: 5em; text-align: center"
type="text" name="page" placeholder="${pagedData.number + 1}"/>
<a href="<spring:url value=""><spring:param name="page" value="${pagedData.number+2}" /><spring:param name="filter" value="${jsonFilter}" /></spring:url>"><spring:message
code="pagination.next-page"/></a>
</div>
</form>
</div>
<div class="col-md-12 col-lg-7 text-right" style="padding-top: 12px">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" id="menuShareLink">
<span class="glyphicon glyphicon-share"></span><span><spring:message code="share.link"/></span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li class="padding10">
<p><spring:message code="share.link.text"/></p>
<input id="shortLink" type="text"
placeholder="<spring:message code="share.link.placeholder" />" value=""/>
</li>
</ul>
</div>
<div class="col-lg-5 filter-new">
<c:choose>
<c:when test="${filter.filterType=='LIST'}">
<div class="">
<c:forEach items="${filter.options}" var="option">
<div>
<label>
<input class="filter-list" id="<c:out value="${normalizedKey}${option.value}" />_input" ${fn:contains(filters[appliedFilter.key], option.value)?'checked':''} norm-key="<c:out value="${normalizedKey}" />" i-key="<c:out value="${filter.key}" />" type="checkbox" value="${option.value}" />
<spring:message code="${option.name}"/>
</label>
</div>
</c:forEach>
</div>
</c:when>
<c:when test="${filter.filterType=='I18NLIST'}">
<div class="">
<c:forEach items="${filter.options}" var="option">
<div>
<label>
<input class="filter-list" id="<c:out value="${normalizedKey}${option.value}" />_input" ${fn:contains(filters[appliedFilter.key], option.value)?'checked':''} norm-key="<c:out value="${normalizedKey}" />" i-key="<c:out value="${filter.key}" />" type="checkbox" value="${option.value}" />
<spring:message code="${option.name}"/>
</label>
</div>
</c:forEach>
<div><label><input type="checkbox" ${fn:contains(filters[appliedFilter.key], 'null')?'checked':''} class="filter-bool" i-key="<c:out value="${filter.key}" />" id="<c:out value="${normalizedKey}" />" value="null"><spring:message code="boolean.null"/></label></div>