Commit 07f1c7f4 authored by Matija Obreza's avatar Matija Obreza

Merge branch '247-wording' into 'master'

Resolve "Wording"

Closes #247

See merge request genesys-pgr/genesys-ui!249
parents 7fae1c95 d194813f
......@@ -69,7 +69,7 @@
"subtaxa": "Subtaxa"
},
"origin": {
"iso3": "Origin"
"iso3": "Provenance"
},
"taxonomy": {
"genus": "Genus",
......@@ -224,9 +224,9 @@
"home": "Home",
"explore": "Explore",
"exploreAccessions": "Explore all accessions",
"exploreCountry": "PGRFA by country code",
"exploreCountry": "Provenance of PGRFA",
"exploreInstitutes": "Genebanks",
"explorePartners": "Genesys partners",
"explorePartners": "Data providers to Genesys",
"exploreOrganizations": "PGRFA networks",
"exploreCrops": "Crops and crop groups",
"exploreSubsets": "Core collections and subsets",
......@@ -326,7 +326,7 @@
"Home": "Home",
"My Dashboard": "My dashboard",
"My profile": "My profile",
"Partners": "Partners",
"Partners": "Data providers",
"Admin": "Administration",
"login": "Login",
"register": "Registration"
......@@ -530,7 +530,7 @@
"stats": "Accession record",
"stats_plural": "Accession records",
"acceNumb": "Accession number",
"countryOfOrigin": "Country of origin",
"countryOfOrigin": "Origin of material",
"instituteCode": "Institute code",
"institute": {
"country": {
......@@ -677,7 +677,7 @@
"stats": "Accession record",
"stats_plural": "Accession records",
"acceNumb": "Accession number",
"countryOfOrigin": "Country of origin",
"countryOfOrigin": "Provenance of material",
"instituteCode": "Institute code",
"taxonomy": "Taxonomy",
"genus": "Genus",
......@@ -796,7 +796,7 @@
"sampStat": "Biological status of accession",
"taxonomy genus": "Genus",
"taxonomy genusSpecies": "Species",
"countryOfOrigin code3": "Country of Origin",
"countryOfOrigin code3": "Provenance of material",
"donorCode": "FAO WIEWS code of donor institute",
"mlsStatus": "ITGPRFA Multi-lateral system",
"available": "Available for distribution",
......@@ -1513,13 +1513,13 @@
"public": {
"p": {
"countryList": {
"title": "ISO-3166 list",
"subTitle": "Find registered institutes as well as overview on plant genetic resources",
"title": "Provenance of PGRFA",
"subTitle": "Browse provenances of plant genetic resources in Genesys",
"acceCount": "{{count, number}} accessions",
"acceCountAtInstitutes": "{{count, number}} accessions at {{institutes, number}} institutes",
"accessionsInGenesys": "Provenance of accessions",
"institutesCountInWIEWS": "{{count, number}} institutes registered in WIEWS",
"instituteLocations": "Institute locations",
"instituteLocations": "Data providers to Genesys",
"moreInformation": "More information",
"isoCodes": "ISO-3166",
"countryProfile": "ISO-3166 code {{code}}"
......@@ -1796,11 +1796,11 @@
"countries": "Countries",
"modelName": "Data provider",
"modelName_plural": "Data providers",
"subtitle": "Data providers in the Catalog of Phenotypic Datasets",
"title": "Genesys Data providers",
"subtitle": "Data providers to Genesys",
"title": "Data providers",
"wiewsCodes": "FAO WIEWS codes",
"menu": "Data providers",
"partnerName": "Partner name",
"partnerName": "Data provider name",
"acronym": "Acronym"
},
"public": {
......@@ -1830,8 +1830,8 @@
},
"p": {
"browse": {
"title": "Genesys Data providers",
"subtitle": "Data providers in the Catalog of Phenotypic Datasets"
"title": "Data providers",
"subtitle": "Data providers to Genesys"
},
"display": {
"email": "Contact email",
......
......@@ -310,7 +310,7 @@
"stats": "Accession record",
"stats_plural": "Accession records",
"acceNumb": "Accession number",
"countryOfOrigin": "Origin of material",
"countryOfOrigin": "Provenance of material",
"instituteCode": "Institute code",
"taxonomy": "Taxonomy",
"genus": "Genus",
......@@ -429,7 +429,7 @@
"sampStat": "Biological status of accession",
"taxonomy genus": "Genus",
"taxonomy genusSpecies": "Species",
"countryOfOrigin code3": "Origin of material",
"countryOfOrigin code3": "Provenance of material",
"donorCode": "FAO WIEWS code of donor institute",
"mlsStatus": "ITGPRFA Multi-lateral system",
"available": "Available for distribution",
......
......@@ -2,13 +2,13 @@
"public": {
"p": {
"countryList": {
"title": "ISO-3166 list",
"subTitle": "Find registered institutes as well as overview on plant genetic resources",
"title": "Provenance of PGRFA",
"subTitle": "Browse provenances of plant genetic resources in Genesys",
"acceCount": "{{count, number}} accessions",
"acceCountAtInstitutes": "{{count, number}} accessions at {{institutes, number}} institutes",
"accessionsInGenesys": "Provenance of accessions",
"institutesCountInWIEWS": "{{count, number}} institutes registered in WIEWS",
"instituteLocations": "Institute locations",
"instituteLocations": "Data providers to Genesys",
"moreInformation": "More information",
"isoCodes": "ISO-3166",
"countryProfile": "ISO-3166 code {{code}}"
......
......@@ -22,6 +22,9 @@ import LocationMap from 'ui/common/LocationMap';
import Loading from 'ui/common/Loading';
import Number from 'ui/common/Number';
import PageTitle from 'ui/common/PageTitle';
import PropertiesCard from 'ui/common/PropertiesCard';
import PieChart from 'ui/common/pie-chart';
import GridContainer from 'ui/layout/GridContainer';
interface ICountryDisplayPageProps extends React.ClassAttributes<any> {
details: CountryDetails;
......@@ -79,6 +82,15 @@ class CountryDisplayPage extends React.Component<ICountryDisplayPageProps> {
const {details, isoCode, mapLayers, t} = this.props;
const stillLoading: boolean = (! details || details.code3 !== isoCode);
let mlsStatusOverview;
let taxonomyGenusSpeciesOverview;
if (!stillLoading) {
const mlsStatusKey = 'mlsStatus';
mlsStatusOverview = details.overview[mlsStatusKey];
const taxonomyGenusSpeciesKey = 'taxonomy.genusSpecies';
taxonomyGenusSpeciesOverview = details.overview[taxonomyGenusSpeciesKey];
}
return (
<PageLayout>
<PageTitle title={ `${t('geo.public.p.countryList.countryProfile', { code: isoCode }) }` } />
......@@ -100,6 +112,47 @@ class CountryDisplayPage extends React.Component<ICountryDisplayPageProps> {
</Properties>
</MainSection>
<GridContainer className="mb-15">
{ taxonomyGenusSpeciesOverview && taxonomyGenusSpeciesOverview.terms && taxonomyGenusSpeciesOverview.terms.length > 0 &&
<PropertiesCard
title={ t('institutes.public.p.display.representedSpecies') }
propertiesList={ taxonomyGenusSpeciesOverview.terms.slice(0, 5).map((term) => ({title: term.term, value: term.count})) }
small propertyItemProps={ { numeric: true } }
>
<PieChart
data={
taxonomyGenusSpeciesOverview.terms.slice(0, 5).map(
(term) => ({
value: term.count,
label: term.term,
}),
)
}
/>
</PropertiesCard>
}
{ mlsStatusOverview && mlsStatusOverview.terms && mlsStatusOverview.terms.length > 0 &&
''
// <PropertiesCard
// title={ t('institutes.public.p.display.mlsStatus') }
// propertiesList={ mlsStatusOverview.terms.map((term) => ({title: term.term, value: term.count})) }
// small propertyItemProps={ { numeric: true } }
// >
// <PieChart
// data={
// mlsStatusOverview.terms.map(
// (term) => ({
// value: term.count,
// label: term.term,
// }),
// )
// }
// />
// </PropertiesCard>
}
</GridContainer>
{ details.genesysInstitutes && details.genesysInstitutes.length > 0 &&
<PageSection title={ t('geo.public.p.countryList.instituteLocations') }>
<LocationMap
......
......@@ -18,11 +18,11 @@
"countries": "Countries",
"modelName": "Data provider",
"modelName_plural": "Data providers",
"subtitle": "Data providers in the Catalog of Phenotypic Datasets",
"title": "Genesys Data providers",
"subtitle": "Data providers to Genesys",
"title": "Data providers",
"wiewsCodes": "FAO WIEWS codes",
"menu": "Data providers",
"partnerName": "Partner name",
"partnerName": "Data provider name",
"acronym": "Acronym"
},
"public": {
......@@ -52,8 +52,8 @@
},
"p": {
"browse": {
"title": "Genesys Data providers",
"subtitle": "Data providers in the Catalog of Phenotypic Datasets"
"title": "Data providers",
"subtitle": "Data providers to Genesys"
},
"display": {
"email": "Contact email",
......
import * as React from 'react';
import { translate } from 'react-i18next';
import Grid from '@material-ui/core/Grid';
import Paper from '@material-ui/core/Paper';
import Divider from '@material-ui/core/Divider';
import Page from 'model/Page';
import Partner from 'model/genesys/Partner';
interface ISummaryProps extends React.ClassAttributes<any> {
paged: Page<Partner>;
t: any;
}
class Summary extends React.Component<ISummaryProps, any> {
public render() {
const { paged, t } = this.props;
return (
<Paper square>
<div className="pl-20 pr-20 pt-20 pb-20">
<h4 className="green font-bold m-0">
{ t('partners.public.c.summary.title') }
</h4>
</div>
<Divider/>
<div>
<Grid container spacing={ 0 } className="pt-20 pb-10">
<Grid item xs={ 12 }>
<div className="pt-15 pb-15 pl-20 pr-20 mb-10 even-row">
<h4 className="font-bold mb-15">
{ t('partners.public.c.summary.publisherNumber') }
</h4>
<h1 className="font-bold m-0">
{ paged.totalElements }
</h1>
</div>
</Grid>
<Grid item xs={ 12 }>
<div className="pt-15 pb-15 pl-20 pr-20 mb-10 even-row">
<h4 className="font-bold mb-15">
{ t('partners.public.c.summary.countryNumber') }
</h4>
<h1 className="font-bold m-0">
65
</h1>
</div>
</Grid>
<Grid item xs={ 12 }>
<div className="pt-15 pb-15 pl-20 pr-20 mb-10 even-row">
<h4 className="font-bold mb-15">
{ t('partners.public.c.summary.instituteNumber') }
</h4>
<h1 className="font-bold m-0">
{ paged.totalElements }
</h1>
</div>
</Grid>
</Grid>
</div>
</Paper>
);
}
}
export default translate()(Summary);
......@@ -68,7 +68,7 @@
"subtaxa": "Subtaxa"
},
"origin": {
"iso3": "Origin"
"iso3": "Provenance"
},
"taxonomy": {
"genus": "Genus",
......@@ -223,9 +223,9 @@
"home": "Home",
"explore": "Explore",
"exploreAccessions": "Explore all accessions",
"exploreCountry": "PGRFA by country code",
"exploreCountry": "Provenance of PGRFA",
"exploreInstitutes": "Genebanks",
"explorePartners": "Genesys partners",
"explorePartners": "Data providers to Genesys",
"exploreOrganizations": "PGRFA networks",
"exploreCrops": "Crops and crop groups",
"exploreSubsets": "Core collections and subsets",
......@@ -325,7 +325,7 @@
"Home": "Home",
"My Dashboard": "My dashboard",
"My profile": "My profile",
"Partners": "Partners",
"Partners": "Data providers",
"Admin": "Administration",
"login": "Login",
"register": "Registration"
......
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