Commit 02da7540 authored by Matija Obreza's avatar Matija Obreza
Browse files

Cherry picked overview-ui (+1 squashed commit)

Squashed commits:
[f43788b] Crop may not exist
parent 48344362
......@@ -327,11 +327,16 @@ public class ExplorerController extends BaseController implements InitializingBe
Map<String, Map<String, Integer>> crops = new HashMap<>();
appliedFilters.removeIf(appliedFilter -> appliedFilter.getKey().equals(FilterConstants.CROPS));
for (Term term: elasticService.termStatisticsAuto(appliedFilters, FilterConstants.CROPS, 30).getTerms()) {
for (Term term : elasticService.termStatisticsAuto(appliedFilters, FilterConstants.CROPS, 30).getTerms()) {
String cropShortName = term.getTerm();
Crop crop = cropService.getCrop(cropShortName);
Map<String, Integer> values = new HashMap<>();
values.put(crop.getName(Locale.getDefault()), term.getCount());
if (crop != null) {
values.put(crop.getName(getLocale()), term.getCount());
} else {
_logger.info("No crop for shortName=" + cropShortName);
values.put(cropShortName, term.getCount());
}
crops.put(cropShortName, values);
}
......
......@@ -2236,7 +2236,30 @@ table.accessions {
padding: 5px 8px 4px;
font-size: 14px;
}
.terms-table {
font-family: $default-font-family;
.row {
margin: 0 0 5px 0;
div {
padding: 10px;
line-height: 20px;
}
div:first-child {
border-right: 2px solid white;
}
}
.row:nth-child(odd) {
background-color: #f8f7f5;
}
.row:nth-child(even) {
background-color: #f3f2ee;
}
.stats-number {
float: right;
}
}
.country-page, .wiews-institute {
font-family: $default-font-family;
.section-inner-content {
.row {
margin: 0 0 5px 0;
......@@ -2355,7 +2378,7 @@ table.accessions {
min-height: 325px;
}
.section-inner-content.min-height {
min-height: 355px;
min-height: 360px;
}
}
.stat-by-genus, .pdci {
......@@ -2363,7 +2386,7 @@ table.accessions {
min-height: 325px;
}
.section-inner-content.min-height {
min-height: 355px;
min-height: 360px;
}
}
.collect-info.see-also,
......@@ -2594,6 +2617,43 @@ table.accessions {
}
}
}
//overview page
.overview-page {
font-family: $default-font-family;
.main-col-header {
padding: 15px 20px 5px 20px;
.btn-default {
margin-bottom: 10px;
}
}
#allfilters {
font-family: $heading-font-family;
font-size: 30px;
.filter-block {
div {
display: inline-block;
}
}
.filter-values {
color: #88ba42;
}
}
.row-section-heading {
padding: 10px 15px;
font-family: $light-font-family;
border-bottom: 4px double #f3f2ee;
color: #4d4c46;
font-size: 30px;
span {
font-size: 20px;
margin-right: 10px;
color: #88ba42;
}
}
.row-section {
margin-bottom: 10px;
}
}
//article-page
.article-page {
.main-col-header {
......@@ -4018,6 +4078,18 @@ table.accessions {
}
}
}
//overview page
.overview-page {
.main-col-header {
.pull-right {
float: none !important;
text-align: center;
}
.results {
text-align: center;
}
}
}
//map page
.map-page {
.main-col-header {
......@@ -4570,6 +4642,15 @@ table.accessions {
}
}
}
//overview page
.overview-page {
.row-section {
padding: 0;
.section-inner-content {
padding: 20px 0 27px 0;
}
}
}
//map page
.map-page {
.map-wrapper {
......
......@@ -6,17 +6,16 @@
<head>
<title><spring:message code="data-overview" /></title>
</head>
<body>
<body class="overview-page">
<cms:informative-h1 title="data-overview" fancy="true" info="data-overview.intro" />
<div class="main-col-header clearfix">
<div class="row">
<div class="col-xs-9 pull-right text-right">
<div class="row main-col-header clearfix">
<div class="nav-header">
<div class="pull-right text-right">
<a class="btn btn-default" href="<c:url value="/explore"><c:param name="filter" value="${jsonFilter}" /></c:url>"><span class="glyphicon glyphicon-list"></span><span style="margin-left: 0.5em;"><spring:message code="view.accessions" /></span></a>
<a class="btn btn-default" href="<c:url value="/explore/map"><c:param name="filter" value="${jsonFilter}" /></c:url>"><span class="glyphicon glyphicon-globe"></span><span style="margin-left: 0.5em;"><spring:message code="maps.view-map" /></span></a>
</div>
<div class="col-xs-3 results">
<div class="results">
<a class="btn btn-default" href="javascript: window.history.go(-1);"><spring:message code="navigate.back" /></a>
</div>
</div>
......@@ -31,17 +30,16 @@
<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">
<div class="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}" />
<span><spring:message code="filter.${filter.key}" /></span>
</c:if>
</div>
<div class="col-lg-9">
<div class="filter-values" id="<c:out value="${normalizedKey}" />_value">
<c:if test="${appliedFilter.inverse}">
<spring:message code="filter.inverse" />
......@@ -83,89 +81,90 @@
<c:remove var="string" />
</c:forEach>
</div>
</div>
</div>
</c:forEach>
</div>
</c:if>
<h3><spring:message code="data-overview.institutes" /></h3>
<h3 class="row row-section-heading"><span class="glyphicon glyphicon-leaf"></span><spring:message code="data-overview.institutes" /></h3>
<div class="row">
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-instcode"><spring:message code="filter.institute.code" /></h4>
<local:term-result termResult="${statsInstCode}" type="instCode" />
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-instcode"><spring:message code="filter.institute.code" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsInstCode}" type="instCode" /></div>
</div>
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-instcty"><spring:message code="filter.institute.country.iso3" /></h4>
<local:term-result termResult="${statsInstCountry}" type="country" />
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-instcty"><spring:message code="filter.institute.country.iso3" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsInstCountry}" type="country" /></div>
</div>
</div>
<h3><spring:message code="data-overview.composition" /></h3>
<h3 class="row row-section-heading"><span class="glyphicon glyphicon-leaf"></span><spring:message code="data-overview.composition" /></h3>
<div class="row">
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-crops"><spring:message code="filter.crops" /></h4>
<local:term-result termResult="${statsCrops}" type="crop" />
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-crops"><spring:message code="filter.crops" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsCrops}" type="crop" /></div>
</div>
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-sampstat"><spring:message code="filter.sampStat" /></h4>
<local:term-result termResult="${statsSampStat}" type="i18n.accession.sampleStatus" />
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-sampstat"><spring:message code="filter.sampStat" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsSampStat}" type="i18n.accession.sampleStatus" /></div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-genus"><spring:message code="filter.taxonomy.genus" /></h4>
<local:term-result termResult="${statsGenus}" type="genus" />
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-genus"><spring:message code="filter.taxonomy.genus" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsGenus}" type="genus" /></div>
</div>
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-species"><spring:message code="filter.taxonomy.species" /></h4>
<local:term-result termResult="${statsSpecies}" type="species" />
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-species"><spring:message code="filter.taxonomy.species" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsSpecies}" type="species" /></div>
</div>
</div>
<h3><spring:message code="data-overview.sources" /></h3>
<h3 class="row row-section-heading"><span class="glyphicon glyphicon-leaf"></span><spring:message code="data-overview.sources" /></h3>
<div class="row">
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-orgcty"><spring:message code="filter.orgCty.iso3" /></h4>
<local:term-result termResult="${statsOrgCty}" type="country" />
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-orgcty"><spring:message code="filter.orgCty.iso3" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsOrgCty}" type="country" /></div>
</div>
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-donorcode"><spring:message code="data-overview.donorCode" /></h4>
<local:term-result termResult="${statsDonorCode}" type="instCode" />
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-donorcode"><spring:message code="data-overview.donorCode" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsDonorCode}" type="instCode" /></div>
</div>
</div>
<h3><spring:message code="data-overview.availability" /></h3>
<h3 class="row row-section-heading"><span class="glyphicon glyphicon-leaf"></span><spring:message code="data-overview.availability" /></h3>
<div class="row">
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-sampstat"><spring:message code="data-overview.mlsStatus" /></h4>
<local:term-result termResult="${statsMLS}" type="bool" />
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-sampstat"><spring:message code="data-overview.mlsStatus" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsMLS}" type="bool" /></div>
</div>
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-available"><spring:message code="filter.available" /></h4>
<local:term-result termResult="${statsAvailable}" type="bool" />
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-available"><spring:message code="filter.available" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsAvailable}" type="bool" /></div>
</div>
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-available"><spring:message code="filter.historic" /></h4>
<local:term-result termResult="${statsHistoric}" type="bool" />
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-available"><spring:message code="filter.historic" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsHistoric}" type="bool" /></div>
</div>
</div>
<h3><spring:message code="data-overview.management" /></h3>
<h3 class="row row-section-heading"><span class="glyphicon glyphicon-leaf"></span><spring:message code="data-overview.management" /></h3>
<div class="row">
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-duplsite"><spring:message code="filter.duplSite" /></h4>
<local:term-result termResult="${statsDuplSite}" count="${accessionCount}" type="instCode" />
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-duplsite"><spring:message code="filter.duplSite" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsDuplSite}" count="${accessionCount}" type="instCode" /></div>
</div>
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-duplsite"><spring:message code="filter.sgsv" /></h4>
<local:term-result termResult="${statsSGSV}" type="bool" />
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-duplsite"><spring:message code="filter.sgsv" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsSGSV}" type="bool" /></div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-storage"><spring:message code="filter.storage" /></h4>
<local:term-result termResult="${statsStorage}" count="${accessionCount}" type="i18n.accession.storage" />
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 row-section">
<h4 class="section-heading" id="stats-storage"><spring:message code="filter.storage" /></h4>
<div class="section-inner-content clearfix"><local:term-result termResult="${statsStorage}" count="${accessionCount}" type="i18n.accession.storage" /></div>
</div>
</div>
......
......@@ -39,7 +39,7 @@
<spring:message code="boolean.false" />
</c:when>
<c:when test="${type ne null && type.startsWith('i18n')}">
<spring:message code="${type.substring(5).concat('.').concat(term.term)}" />
<span class="sci-name"><spring:message code="${type.substring(5).concat('.').concat(term.term)}" /></span>
</c:when>
<c:when test="${type=='genus'}">
<a href="<c:url value="/acn/t/${term.term}" />"><span dir="ltr" class="sci-name" ><c:out value="${term.term}" /></span></a>
......
Supports Markdown
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