Commit 3ed87a50 authored by Matija Obreza's avatar Matija Obreza
Browse files

Crops filter rendered as dropdown

parent 8125c880
......@@ -190,8 +190,13 @@ public class ExplorerController extends BaseController {
throws IOException {
List<GenesysFilterService.GenesysFilter> additionalFilters = filterService.selectFilters(selectedFilters);
model.addAttribute("additionalFilters", additionalFilters);
if (ArrayUtils.contains(selectedFilters, "crop")) {
_logger.debug("Adding crop list");
model.addAttribute("crops", cropService.list(getLocale()));
}
return "/accession/additional-filter";
}
......
......@@ -27,6 +27,21 @@
<div class="col-lg-5 filter-new">
<c:choose>
<c:when test="${filter.name=='crop'}">
<div class="form-group input-group">
<span class="input-group-btn">
<select name="crop" id="cropselector" onclick="filterCrop('${filterKey}')" class="form-control">
<option value=""></option>
<c:forEach items="${crops}" var="c">
<option value="${c.shortName}" ${c.shortName== crop.shortName?'selected':''} ><c:out value="${c.getName(pageContext.response.locale)}" /></option>
</c:forEach>
</select>
</span>
</div>
<div style="margin-top: 3px">
<button class="btn btn-primary apply"><spring:message code="filter.apply"/></button>
</div>
</c:when>
<c:when test="${filter.filterType=='LIST'}">
<div class="">
<c:forEach items="${filter.options}" var="option">
......
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