Commit a928c690 authored by Matija Obreza's avatar Matija Obreza
Browse files

Added a.inSvalbard filter

parent 8c7f843f
......@@ -17,7 +17,7 @@ public interface GenesysFilterService {
public static interface GenesysFilter {
public enum FilterType {
FIXEDSTRING, STRING, NUMERIC
FIXEDSTRING, STRING, NUMERIC, BOOLEAN
}
}
......
......@@ -64,6 +64,7 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
this.availableFilters.add(new GenesysFilterImpl("genus", FilterType.STRING));
this.availableFilters.add(new GenesysFilterImpl("taxon", FilterType.STRING));
this.availableFilters.add(new GenesysFilterImpl("crop", FilterType.STRING));
this.availableFilters.add(new GenesysFilterImpl("inSvalbard", FilterType.BOOLEAN));
}
@Override
......@@ -98,6 +99,7 @@ public class GenesysFilterServiceImpl implements GenesysFilterService {
StringBuffer sbf=new StringBuffer();
createQuery(sbf, "a.Origin", jsonTree.get("origin"), params);
createQuery(sbf, "a.Institute", jsonTree.get("institute"), params);
createQuery(sbf, "a.In_Svalbard", jsonTree.get("inSvalbard"), params);
createQuery(sbf, "org.slug", jsonTree.get("organization"), params);
createQuery(sbf, "t.Genus", jsonTree.get("genus"), params);
createQuery(sbf, "t.Taxon_Name", jsonTree.get("taxon"), params);
......
......@@ -195,6 +195,7 @@ filter.lon=Longitude
filter.alt=Altitude
filter.genus=Genus
filter.taxon=Taxonomy name
filter.inSvalbard=In Svalbard
search.page.title=Full-text Search
search.no-results=No matches found for your query.
......
......@@ -17,12 +17,15 @@
<div class="clearfix pull-left" id="filter-${filter.name}">
<div class="filter-values pull-left"></div>
<c:choose>
<c:when test="${filter.type=='NUMERIC'}">
<div class="filter-new pull-left">Min: <input class="span1" type="text" /> Max: <input class="span1" type="text" /> <button class="notimportant">+</button></div>
</c:when>
<c:otherwise>
<div class="filter-new pull-left"><input class="span2" type="text" /><button class="notimportant">+</button></div>
</c:otherwise>
<c:when test="${filter.type=='NUMERIC'}">
<div class="filter-new pull-left">Min: <input class="span1" type="text" /> Max: <input class="span1" type="text" /> <button class="notimportant">+</button></div>
</c:when>
<%-- <c:when test="${filter.type=='BOOLEAN'}">
<div class="filter-new pull-left"><input type="checkbox" id="check.${filter.name}" /> <label for="check.${filter.name}">Yes</label> <button class="notimportant">+</button></div>
</c:when> --%>
<c:otherwise>
<div class="filter-new pull-left"><input class="span2" type="text" /><button class="notimportant">+</button></div>
</c:otherwise>
</c:choose>
</div>
</div>
......
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