Commit f8b43467 authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch '222-accession-location-map' into 'master'

Accession location map

Closes #222

See merge request genesys-pgr/genesys-ui!235
parents 94446d27 0e728c03
......@@ -323,7 +323,7 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> {
</PageSection>
}
{ accession.coll &&
{ (accession.coll || accession.countryOfOrigin || accession.geo) &&
<PageSection title={ t('accessions.public.p.display.collectingInformation') }>
<Properties>
{ accession.countryOfOrigin &&
......@@ -332,13 +332,13 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> {
<AuditedInfo info={ auditAccessionCollect.countryOfOrigin }/>
</PropertiesItem>
}
{ accession.coll.collDate &&
{ accession.coll && accession.coll.collDate &&
<PropertiesItem key="collDate" title={ t(`accessions.common.coll.collDate`) }>
<McpdDate value={ accession.coll.collDate } />
<AuditedInfo info={ auditAccessionCollect.collDate }/>
</PropertiesItem>
}
{ accession.coll.collSrc &&
{ accession.coll && accession.coll.collSrc &&
<PropertiesItem key="collSrc" title={ t(`accessions.common.coll.collSrc`) }>
{ t(`accessions.common.collectingSource.${accession.coll.collSrc}`) }
<AuditedInfo info={ auditAccessionCollect.collSrc } tPrefix="accessions.common.collectingSource"/>
......
......@@ -18,7 +18,6 @@ import PrettyFilters from 'ui/common/filter/PrettyFilters';
import ButtonBar from 'ui/common/buttons/ButtonBar';
import ContentLayout from 'ui/layout/ContentLayout';
import MapConfigSection from './c/MapConfigSection';
import Control from 'react-leaflet-control';
import MapAccessionsFilters from 'accessions/ui/c/MapAccessionsFilters';
import BioClimateDisplay from 'accessions/ui/c/BioClimateDisplay';
......@@ -37,6 +36,7 @@ let Map;
let TileLayer;
let Popup;
let Rectangle;
let Control;
const popupContentLimit = 11;
......@@ -166,6 +166,7 @@ class BrowsePage extends React.Component<IMapPageProps, any> {
TileLayer = require('react-leaflet').TileLayer;
Popup = require('react-leaflet').Popup;
Rectangle = require('react-leaflet').Rectangle;
Control = require('react-leaflet-control').default;
}
}
......
......@@ -62,7 +62,6 @@ class BrowsePage extends BrowsePageTemplate<DescriptorList> {
roughItemHeight={ 200 }
itemRenderer={ this.renderDescriptorList }
/>
}
</PageContents>
</PageLayout>
);
......
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