Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Genesys Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Backend
Commits
33e8a08b
Commit
33e8a08b
authored
Sep 01, 2014
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show selected filters in Overview
parent
2e227d8b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
112 additions
and
19 deletions
+112
-19
src/main/java/org/genesys2/server/servlet/controller/ExplorerController.java
...enesys2/server/servlet/controller/ExplorerController.java
+8
-0
src/main/webapp/WEB-INF/jsp/accession/overview.jsp
src/main/webapp/WEB-INF/jsp/accession/overview.jsp
+81
-18
src/main/webapp/WEB-INF/jsp/accession/termresult.jspf
src/main/webapp/WEB-INF/jsp/accession/termresult.jspf
+1
-1
src/main/webapp/html/css/custom.css
src/main/webapp/html/css/custom.css
+22
-0
No files found.
src/main/java/org/genesys2/server/servlet/controller/ExplorerController.java
View file @
33e8a08b
...
@@ -445,6 +445,14 @@ public class ExplorerController extends BaseController {
...
@@ -445,6 +445,14 @@ public class ExplorerController extends BaseController {
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
);
AppliedFilters
appliedFilters
=
mapper
.
readValue
(
jsonFilter
,
AppliedFilters
.
class
);
String
[]
selectedFilters
=
appliedFilters
.
getFilterNames
();
final
List
<
GenesysFilter
>
currentFilters
=
filterHandler
.
selectFilters
(
selectedFilters
);
model
.
addAttribute
(
"currentFilters"
,
currentFilters
);
// JSP works with JsonObject
final
Map
<
String
,
List
<
String
>>
filters
=
mapper
.
readValue
(
appliedFilters
.
toString
(),
Map
.
class
);
model
.
addAttribute
(
"filters"
,
filters
);
// Composition overview
// Composition overview
overviewInstitutes
(
model
,
appliedFilters
);
overviewInstitutes
(
model
,
appliedFilters
);
...
...
src/main/webapp/WEB-INF/jsp/accession/overview.jsp
View file @
33e8a08b
...
@@ -19,9 +19,72 @@
...
@@ -19,9 +19,72 @@
</div>
</div>
</div>
</div>
<c:if
test=
"
${
fn:
length
(
currentFilters
)
gt
0
}
"
>
<div
id=
"allfilters"
class=
"disabled applied-filters"
>
<%-- Only render currently present filters --%>
<c:forEach
items=
"
${
currentFilters
}
"
var=
"filter"
>
<c:set
var=
"normalizedKey"
value=
"
${
filter
.
key
.
replace
(
'.'
,
'-'
).
replace
(
':'
,
'_'
)
}
"
/>
<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>
</div>
<div
class=
"col-lg-9"
>
<div
class=
"filter-values"
id=
"
<c:out
value=
"
${
normalizedKey
}
"
/>
_value"
>
<c:forEach
items=
"
${
filters
[
filter
.
key
]
}
"
var=
"value"
>
<c:set
var=
"string"
value=
"
${
value
}
"
/>
<c:if
test=
"
${
fn:
contains
(
value
,
'range'
)
}
"
>
<c:set
var=
"string"
value=
"
${
fn:
replace
(
value
,
'{range=['
,
'Between '
)
}
"
/>
<c:set
var=
"string"
value=
"
${
fn:
replace
(
string
,
','
,
' and '
)
}
"
/>
<c:set
var=
"string"
value=
"
${
fn:
replace
(
string
,
']}'
,
''
)
}
"
/>
<c:set
var=
"value"
value=
"
${
fn:
replace
(
value
,
'{'
,
'{\"'
)
}
"
/>
<c:set
var=
"value"
value=
"
${
fn:
replace
(
value
,
'='
,
'\":'
)
}
"
/>
</c:if>
<c:if
test=
"
${
fn:
contains
(
value
,
'min'
)
}
"
>
<c:set
var=
"string"
value=
"
${
fn:
replace
(
value
,
'{min='
,
'More than '
)
}
"
/>
<c:set
var=
"string"
value=
"
${
fn:
replace
(
string
,
'}'
,
''
)
}
"
/>
<c:set
var=
"value"
value=
"
${
fn:
replace
(
value
,
'{'
,
'{\"'
)
}
"
/>
<c:set
var=
"value"
value=
"
${
fn:
replace
(
value
,
'='
,
'\":'
)
}
"
/>
</c:if>
<c:if
test=
"
${
fn:
contains
(
value
,
'max'
)
}
"
>
<c:set
var=
"string"
value=
"
${
fn:
replace
(
value
,
'{max='
,
'Less than '
)
}
"
/>
<c:set
var=
"string"
value=
"
${
fn:
replace
(
string
,
'}'
,
''
)
}
"
/>
<c:set
var=
"value"
value=
"
${
fn:
replace
(
value
,
'{'
,
'{\"'
)
}
"
/>
<c:set
var=
"value"
value=
"
${
fn:
replace
(
value
,
'='
,
'\":'
)
}
"
/>
</c:if>
<c:if
test=
"
${
fn:
contains
(
value
,
'like'
)
}
"
>
<c:set
var=
"string"
value=
"
${
fn:
replace
(
value
,
'{like='
,
'Like '
)
}
"
/>
<c:set
var=
"string"
value=
"
${
fn:
replace
(
string
,
'}'
,
''
)
}
"
/>
<c:set
var=
"value"
value=
"
${
fn:
replace
(
value
,
'{'
,
'{\"'
)
}
"
/>
<c:set
var=
"value"
value=
"
${
fn:
replace
(
value
,
'='
,
'\":\"'
)
}
"
/>
<c:set
var=
"value"
value=
"
${
fn:
replace
(
value
,
'}'
,
'\"}'
)
}
"
/>
</c:if>
<c:if
test=
"
${
string
==
null
}
"
>
<c:set
var=
"string"
value=
"null"
/>
<c:set
var=
"value"
value=
"null"
/>
</c:if>
<div
class=
"filtval complex"
x-key=
"
<c:out
value=
"
${
normalizedKey
}
"
/><c:out
value=
"
${
value
}
"
/>
"
i-key=
"
<c:out
value=
"
${
filter
.
key
}
"
/>
"
><c:out
value=
"
${
string
}
"
/></div>
<c:remove
var=
"string"
/>
</c:forEach>
</div>
</div>
</div>
</c:forEach>
</div>
</c:if>
<h3><spring:message
code=
"data-overview.institutes"
/></h3>
<h3><spring:message
code=
"data-overview.institutes"
/></h3>
<div
class=
"row
row-section
"
>
<div
class=
"row"
>
<div
class=
"col-xs-12 col-sm-6"
>
<div
class=
"col-xs-12 col-sm-6
row-section
"
>
<h4
id=
"stats-instcode"
><spring:message
code=
"filter.institute.code"
/></h4>
<h4
id=
"stats-instcode"
><spring:message
code=
"filter.institute.code"
/></h4>
<c:set
var=
"type"
value=
"instCode"
/>
<c:set
var=
"type"
value=
"instCode"
/>
<c:set
var=
"termResult"
value=
"
${
statsInstCode
}
"
/>
<c:set
var=
"termResult"
value=
"
${
statsInstCode
}
"
/>
...
@@ -29,7 +92,7 @@
...
@@ -29,7 +92,7 @@
<c:remove
var=
"termResult"
/>
<c:remove
var=
"termResult"
/>
<c:remove
var=
"type"
/>
<c:remove
var=
"type"
/>
</div>
</div>
<div
class=
"col-xs-12 col-sm-6"
>
<div
class=
"col-xs-12 col-sm-6
row-section
"
>
<h4
id=
"stats-instcty"
><spring:message
code=
"filter.institute.country.iso3"
/></h4>
<h4
id=
"stats-instcty"
><spring:message
code=
"filter.institute.country.iso3"
/></h4>
<c:set
var=
"type"
value=
"country"
/>
<c:set
var=
"type"
value=
"country"
/>
<c:set
var=
"termResult"
value=
"
${
statsInstCountry
}
"
/>
<c:set
var=
"termResult"
value=
"
${
statsInstCountry
}
"
/>
...
@@ -40,8 +103,8 @@
...
@@ -40,8 +103,8 @@
</div>
</div>
<h3><spring:message
code=
"data-overview.composition"
/></h3>
<h3><spring:message
code=
"data-overview.composition"
/></h3>
<div
class=
"row
row-section
"
>
<div
class=
"row"
>
<div
class=
"col-xs-12 col-sm-6"
>
<div
class=
"col-xs-12 col-sm-6
row-section
"
>
<h4
id=
"stats-crops"
><spring:message
code=
"filter.crops"
/></h4>
<h4
id=
"stats-crops"
><spring:message
code=
"filter.crops"
/></h4>
<c:set
var=
"type"
value=
"crop"
/>
<c:set
var=
"type"
value=
"crop"
/>
<c:set
var=
"termResult"
value=
"
${
statsCrops
}
"
/>
<c:set
var=
"termResult"
value=
"
${
statsCrops
}
"
/>
...
@@ -49,7 +112,7 @@
...
@@ -49,7 +112,7 @@
<c:remove
var=
"termResult"
/>
<c:remove
var=
"termResult"
/>
<c:remove
var=
"type"
/>
<c:remove
var=
"type"
/>
</div>
</div>
<div
class=
"col-xs-12 col-sm-6"
>
<div
class=
"col-xs-12 col-sm-6
row-section
"
>
<h4
id=
"stats-sampstat"
><spring:message
code=
"filter.sampStat"
/></h4>
<h4
id=
"stats-sampstat"
><spring:message
code=
"filter.sampStat"
/></h4>
<c:set
var=
"type"
value=
"i18n.accession.sampleStatus"
/>
<c:set
var=
"type"
value=
"i18n.accession.sampleStatus"
/>
<c:set
var=
"termResult"
value=
"
${
statsSampStat
}
"
/>
<c:set
var=
"termResult"
value=
"
${
statsSampStat
}
"
/>
...
@@ -58,14 +121,14 @@
...
@@ -58,14 +121,14 @@
<c:remove
var=
"type"
/>
<c:remove
var=
"type"
/>
</div>
</div>
</div>
</div>
<div
class=
"row
row-section
"
>
<div
class=
"row"
>
<div
class=
"col-xs-12 col-sm-6"
>
<div
class=
"col-xs-12 col-sm-6
row-section
"
>
<h4
id=
"stats-genus"
><spring:message
code=
"filter.taxonomy.genus"
/></h4>
<h4
id=
"stats-genus"
><spring:message
code=
"filter.taxonomy.genus"
/></h4>
<c:set
var=
"termResult"
value=
"
${
statsGenus
}
"
/>
<c:set
var=
"termResult"
value=
"
${
statsGenus
}
"
/>
<%@include
file=
"termresult.jspf"
%>
<%@include
file=
"termresult.jspf"
%>
<c:remove
var=
"termResult"
/>
<c:remove
var=
"termResult"
/>
</div>
</div>
<div
class=
"col-xs-12 col-sm-6"
>
<div
class=
"col-xs-12 col-sm-6
row-section
"
>
<h4
id=
"stats-species"
><spring:message
code=
"filter.taxonomy.species"
/></h4>
<h4
id=
"stats-species"
><spring:message
code=
"filter.taxonomy.species"
/></h4>
<c:set
var=
"termResult"
value=
"
${
statsSpecies
}
"
/>
<c:set
var=
"termResult"
value=
"
${
statsSpecies
}
"
/>
<%@include
file=
"termresult.jspf"
%>
<%@include
file=
"termresult.jspf"
%>
...
@@ -74,8 +137,8 @@
...
@@ -74,8 +137,8 @@
</div>
</div>
<h3><spring:message
code=
"data-overview.sources"
/></h3>
<h3><spring:message
code=
"data-overview.sources"
/></h3>
<div
class=
"row
row-section
"
>
<div
class=
"row"
>
<div
class=
"col-xs-12 col-sm-6"
>
<div
class=
"col-xs-12 col-sm-6
row-section
"
>
<h4
id=
"stats-orgcty"
><spring:message
code=
"filter.orgCty.iso3"
/></h4>
<h4
id=
"stats-orgcty"
><spring:message
code=
"filter.orgCty.iso3"
/></h4>
<c:set
var=
"type"
value=
"country"
/>
<c:set
var=
"type"
value=
"country"
/>
<c:set
var=
"termResult"
value=
"
${
statsOrgCty
}
"
/>
<c:set
var=
"termResult"
value=
"
${
statsOrgCty
}
"
/>
...
@@ -83,7 +146,7 @@
...
@@ -83,7 +146,7 @@
<c:remove
var=
"termResult"
/>
<c:remove
var=
"termResult"
/>
<c:remove
var=
"type"
/>
<c:remove
var=
"type"
/>
</div>
</div>
<div
class=
"col-xs-12 col-sm-6"
>
<div
class=
"col-xs-12 col-sm-6
row-section
"
>
<h4
id=
"stats-donorcode"
><spring:message
code=
"filter.donorCode"
/></h4>
<h4
id=
"stats-donorcode"
><spring:message
code=
"filter.donorCode"
/></h4>
<c:set
var=
"type"
value=
"instCode"
/>
<c:set
var=
"type"
value=
"instCode"
/>
<c:set
var=
"termResult"
value=
"
${
statsDonorCode
}
"
/>
<c:set
var=
"termResult"
value=
"
${
statsDonorCode
}
"
/>
...
@@ -94,8 +157,8 @@
...
@@ -94,8 +157,8 @@
</div>
</div>
<h3><spring:message
code=
"data-overview.availability"
/></h3>
<h3><spring:message
code=
"data-overview.availability"
/></h3>
<div
class=
"row
row-section
"
>
<div
class=
"row"
>
<div
class=
"col-xs-12 col-sm-6"
>
<div
class=
"col-xs-12 col-sm-6
row-section
"
>
<h4
id=
"stats-sampstat"
><spring:message
code=
"filter.mlsStatus"
/></h4>
<h4
id=
"stats-sampstat"
><spring:message
code=
"filter.mlsStatus"
/></h4>
<c:set
var=
"type"
value=
"bool"
/>
<c:set
var=
"type"
value=
"bool"
/>
<c:set
var=
"termResult"
value=
"
${
statsMLS
}
"
/>
<c:set
var=
"termResult"
value=
"
${
statsMLS
}
"
/>
...
@@ -103,7 +166,7 @@
...
@@ -103,7 +166,7 @@
<c:remove
var=
"termResult"
/>
<c:remove
var=
"termResult"
/>
<c:remove
var=
"type"
/>
<c:remove
var=
"type"
/>
</div>
</div>
<div
class=
"col-xs-12 col-sm-6"
>
<div
class=
"col-xs-12 col-sm-6
row-section
"
>
<h4
id=
"stats-available"
><spring:message
code=
"filter.available"
/></h4>
<h4
id=
"stats-available"
><spring:message
code=
"filter.available"
/></h4>
<c:set
var=
"type"
value=
"bool"
/>
<c:set
var=
"type"
value=
"bool"
/>
<c:set
var=
"termResult"
value=
"
${
statsAvailable
}
"
/>
<c:set
var=
"termResult"
value=
"
${
statsAvailable
}
"
/>
...
@@ -114,8 +177,8 @@
...
@@ -114,8 +177,8 @@
</div>
</div>
<h3><spring:message
code=
"data-overview.management"
/></h3>
<h3><spring:message
code=
"data-overview.management"
/></h3>
<div
class=
"row
row-section
"
>
<div
class=
"row"
>
<div
class=
"col-xs-12 col-sm-6"
>
<div
class=
"col-xs-12 col-sm-6
row-section
"
>
<h4
id=
"stats-storage"
><spring:message
code=
"filter.storage"
/></h4>
<h4
id=
"stats-storage"
><spring:message
code=
"filter.storage"
/></h4>
<c:set
var=
"type"
value=
"i18n.accession.storage"
/>
<c:set
var=
"type"
value=
"i18n.accession.storage"
/>
<c:set
var=
"termResult"
value=
"
${
statsStorage
}
"
/>
<c:set
var=
"termResult"
value=
"
${
statsStorage
}
"
/>
...
@@ -123,7 +186,7 @@
...
@@ -123,7 +186,7 @@
<c:remove
var=
"termResult"
/>
<c:remove
var=
"termResult"
/>
<c:remove
var=
"type"
/>
<c:remove
var=
"type"
/>
</div>
</div>
<div
class=
"col-xs-12 col-sm-6"
>
<div
class=
"col-xs-12 col-sm-6
row-section
"
>
<h4
id=
"stats-duplsite"
><spring:message
code=
"filter.duplSite"
/></h4>
<h4
id=
"stats-duplsite"
><spring:message
code=
"filter.duplSite"
/></h4>
<c:set
var=
"type"
value=
"instCode"
/>
<c:set
var=
"type"
value=
"instCode"
/>
<c:set
var=
"termResult"
value=
"
${
statsDuplSite
}
"
/>
<c:set
var=
"termResult"
value=
"
${
statsDuplSite
}
"
/>
...
...
src/main/webapp/WEB-INF/jsp/accession/termresult.jspf
View file @
33e8a08b
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<table class="
accession
">
<table class="
terms-table
">
<c:forEach items="${termResult.terms}" var="term">
<c:forEach items="${termResult.terms}" var="term">
<tr><td>
<tr><td>
<c:choose>
<c:choose>
...
...
src/main/webapp/html/css/custom.css
View file @
33e8a08b
...
@@ -1174,6 +1174,24 @@ html[dir="rtl"] #stats .stat-lists ol li img {
...
@@ -1174,6 +1174,24 @@ html[dir="rtl"] #stats .stat-lists ol li img {
margin
:
2px
5px
;
margin
:
2px
5px
;
}
}
#allfilters
.disabled
.filter-block
{
padding
:
2px
5px
;
}
#allfilters
.disabled
.filter-block
.filtval
{
background-image
:
none
;
padding
:
2px
5px
;
}
#allfilters
.edit-fil
{
padding
:
7px
0px
;
}
#allfilters
.disabled
.edit-fil
{
cursor
:
default
;
padding
:
4px
5px
;
}
.filtval
:hover
{
.filtval
:hover
{
background-color
:
#ccc7af
;
background-color
:
#ccc7af
;
text-decoration
:
none
;
text-decoration
:
none
;
...
@@ -1984,3 +2002,7 @@ html[dir="rtl"] .text-left {
...
@@ -1984,3 +2002,7 @@ html[dir="rtl"] .text-left {
.row-section
{
.row-section
{
margin-bottom
:
2em
;
margin-bottom
:
2em
;
}
}
table
.terms-table
td
{
padding
:
4px
10px
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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