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