Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
a928c690
Commit
a928c690
authored
Sep 20, 2013
by
Matija Obreza
Browse files
Added a.inSvalbard filter
parent
8c7f843f
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/service/GenesysFilterService.java
View file @
a928c690
...
...
@@ -17,7 +17,7 @@ public interface GenesysFilterService {
public
static
interface
GenesysFilter
{
public
enum
FilterType
{
FIXEDSTRING
,
STRING
,
NUMERIC
FIXEDSTRING
,
STRING
,
NUMERIC
,
BOOLEAN
}
}
...
...
src/main/java/org/genesys2/server/service/impl/GenesysFilterServiceImpl.java
View file @
a928c690
...
...
@@ -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
);
...
...
src/main/resources/content/language.properties
View file @
a928c690
...
...
@@ -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.
...
...
src/main/webapp/WEB-INF/jsp/filter/index.jsp
View file @
a928c690
...
...
@@ -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>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment