Commit ce6e8f87 authored by Oleksii Savran's avatar Oleksii Savran Committed by Viacheslav Pavlov
Browse files

Tiny UI updates

parent c7da8805
......@@ -232,7 +232,6 @@
"explore": "Explore",
"exploreAccessions": "Explore all accessions",
"exploreCountry": "Provenance of PGRFA",
"exploreInstitutes": "Genebanks",
"explorePartners": "Data providers to Genesys",
"exploreOrganizations": "PGRFA networks",
"exploreCrops": "Crops and crop groups",
......@@ -1500,7 +1499,7 @@
"acceCount": "{{count, number}} accessions",
"acceCountAtInstitutes": "{{count, number}} accessions at {{institutes, number}} institutes",
"accessionsInGenesys": "Provenance of accessions",
"institutesCountInWIEWS": "{{count, number}} institutes registered in WIEWS",
"institutesCountInWIEWS": "{{count, number}} genebanks registered in FAO WIEWS database",
"instituteLocations": "Data providers to Genesys",
"moreInformation": "More information",
"isoCodes": "ISO-3166",
......@@ -1546,7 +1545,7 @@
},
"display": {
"actions": "Browse or download data",
"title": "Institute details",
"title": "Genebank details",
"type": "Type",
"webLink": "Web link",
"about": "About",
......
......@@ -24,7 +24,6 @@ import PieChartCard from 'ui/common/pie-chart/PieChartCard';
import ButtonBar from 'ui/common/buttons/ButtonBar';
import Authorize from 'ui/common/authorized/Authorize';
import PageTitle from 'ui/common/PageTitle';
import PrettyDate from 'ui/common/time/PrettyDate';
import { CardActions } from 'ui/common/Card';
import { Link } from 'react-router-dom';
import Button from '@material-ui/core/Button';
......@@ -96,8 +95,6 @@ class DisplayPage extends React.Component<IDisplayPageProps, any> {
}
<Properties>
<PropertiesItem title={ t('crop.public.c.cropCard.originalName') }>{ crop.name }</PropertiesItem>
{ crop.createdDate && <PropertiesItem title={ t('crop.public.c.cropCard.registered') }><PrettyDate value={ new Date(crop.createdDate) }/></PropertiesItem> }
{ crop.lastModifiedDate && <PropertiesItem title={ t('common:label.lastUpdated') }><PrettyDate value={ new Date(crop.lastModifiedDate) }/></PropertiesItem> }
<PropertiesItem title={ t(`crop.common.accessionsInGenesys`) } keepEmpty>
<a onClick={ this.applyCropFilter }><Number value={ cropDetails.accessionCount || 0 } /></a>
</PropertiesItem>
......
......@@ -7,7 +7,7 @@
"acceCount": "{{count, number}} accessions",
"acceCountAtInstitutes": "{{count, number}} accessions at {{institutes, number}} institutes",
"accessionsInGenesys": "Provenance of accessions",
"institutesCountInWIEWS": "{{count, number}} institutes registered in WIEWS",
"institutesCountInWIEWS": "{{count, number}} genebanks registered in FAO WIEWS database",
"instituteLocations": "Data providers to Genesys",
"moreInformation": "More information",
"isoCodes": "ISO-3166",
......
......@@ -17,7 +17,7 @@
},
"display": {
"actions": "Browse or download data",
"title": "Institute details",
"title": "Genebank details",
"type": "Type",
"webLink": "Web link",
"about": "About",
......
......@@ -27,7 +27,6 @@ import PagedLoader from 'ui/common/PagedLoader';
import {InstituteLink} from 'ui/genesys/Links';
import { PropertiesItem, Properties } from 'ui/common/Properties';
import BlurbText from 'cms/ui/c/BlurbText';
import PrettyDate from 'ui/common/time/PrettyDate';
import { CardActions } from 'ui/common/Card';
import ButtonBar from 'ui/common/buttons/ButtonBar';
import { Button } from '@material-ui/core';
......@@ -128,7 +127,6 @@ class DisplayPage extends React.Component<IDisplayPageProps> {
<Properties>
<PropertiesItem title={ t('networks.public.c.card.title') }>{ network.title }</PropertiesItem>
<PropertiesItem title={ t('networks.public.c.card.slug') }>{ network.slug }</PropertiesItem>
<PropertiesItem title={ t('networks.public.c.card.createdDate') }><PrettyDate value={ network.createdDate }/></PropertiesItem>
</Properties>
<CardActions className="container-spacing-vertical mt-15">
<ButtonBar barLabelText={ t('networks.public.p.display.actions') }>
......@@ -143,8 +141,15 @@ class DisplayPage extends React.Component<IDisplayPageProps> {
{ institutes && institutes.content && institutes.content.length > 0 &&
<PageSection title={ t('networks.common.locations') }>
<LocationMap
locations={ institutes.content.map(
(institute) => ({id: institute.id, lat: institute.latitude, lng: institute.longitude, popup: <InstituteLink key={ institute.code } to={ institute }>{ institute.fullName }</InstituteLink>}))
locations={ institutes.content
.filter((institute) => !!institute.latitude && !!institute.longitude)
.map(
(institute) => ({
id: institute.id,
lat: institute.latitude,
lng: institute.longitude,
popup: <InstituteLink key={ institute.code } to={ institute }>{ institute.fullName }</InstituteLink>,
}))
}
mapLayers={ mapLayers }
/>
......
......@@ -6,7 +6,6 @@ import { PartnerLink } from 'ui/catalog/Links';
import Partner from 'model/genesys/Partner';
import Markdown from 'ui/common/markdown';
import PrettyDate from 'ui/common/time/PrettyDate';
// import { Properties, PropertiesItem } from 'ui/catalog/Properties';
......@@ -47,7 +46,6 @@ const styles = (theme) => ({
},
},
titleCard: {
marginBottom: '20px',
[theme.breakpoints.down('sm')]: {
fontSize: '20px',
lineHeight: '25px',
......@@ -58,7 +56,7 @@ const styles = (theme) => ({
class PartnerCard extends React.Component<IPartnerCardProps, any> {
public render() {
const { partner, classes, t } = this.props;
const { partner, classes } = this.props;
if (!partner) {
return null;
......@@ -72,7 +70,6 @@ class PartnerCard extends React.Component<IPartnerCardProps, any> {
subheader: classes.italic,
} }
title={ <PartnerLink to={ partner }/> as any }
subheader={ partner.createdDate && <span>{ t('common:label.registered') } <PrettyDate value={ partner.createdDate }/></span> }
/>
<CardContent>
{ partner.description && <Markdown firstParagraph source={ partner.description }/> }
......
......@@ -232,7 +232,6 @@
"explore": "Explore",
"exploreAccessions": "Explore all accessions",
"exploreCountry": "Provenance of PGRFA",
"exploreInstitutes": "Genebanks",
"explorePartners": "Data providers to Genesys",
"exploreOrganizations": "PGRFA networks",
"exploreCrops": "Crops and crop groups",
......
......@@ -62,10 +62,6 @@ const PUBLIC_MENUS = [
to: '/descriptorlists',
label: 'public.menu.exploreDescriptorLists',
},
{
to: '/wiews',
label: 'public.menu.exploreInstitutes',
},
{
to: '/iso3166',
label: 'public.menu.exploreCountry',
......
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