diff --git a/client/src/components/ProjectExternalAccessionsDetail.js b/client/src/components/ProjectExternalAccessionsDetail.js new file mode 100644 index 00000000..26881ae9 --- /dev/null +++ b/client/src/components/ProjectExternalAccessionsDetail.js @@ -0,0 +1,27 @@ +import React from 'react' +import { Box } from 'grommet' +import { Link } from 'components/Link' + +export const ProjectExternalAccessionsDetail = ({ + inline = false, + externalAccessions = [] +}) => { + // Comma separated list. + if (inline) { + return externalAccessions.map(({ accession, url }, i) => ( + + {i !== 0 && ', '} + + + )) + } + + // One external accession per line. + return externalAccessions.map(({ accession, url }, i) => ( + + + + )) +} + +export default ProjectExternalAccessionsDetail diff --git a/client/src/components/ProjectPublicationsDetail.js b/client/src/components/ProjectPublicationsDetail.js index aa5c8d7f..922bc21a 100644 --- a/client/src/components/ProjectPublicationsDetail.js +++ b/client/src/components/ProjectPublicationsDetail.js @@ -2,7 +2,7 @@ import React from 'react' import { Box, Text } from 'grommet' import { Link } from 'components/Link' -export const ProjectPublicationsDetail = ({ publications }) => ( +export const ProjectPublicationsDetail = ({ publications = [] }) => ( <> {publications.map((publication, i) => ( diff --git a/client/src/components/ProjectSearchResult.js b/client/src/components/ProjectSearchResult.js index d4ab18ea..1f3dfcba 100644 --- a/client/src/components/ProjectSearchResult.js +++ b/client/src/components/ProjectSearchResult.js @@ -5,6 +5,7 @@ import { Link } from 'components/Link' import { ProjectHeader } from 'components/ProjectHeader' import { ProjectAbstractDetail } from 'components/ProjectAbstractDetail' import { ProjectPublicationsDetail } from 'components/ProjectPublicationsDetail' +import { ProjectExternalAccessionsDetail } from 'components/ProjectExternalAccessionsDetail' export const ProjectSearchResult = ({ project }) => { const searchDetails = [ @@ -25,6 +26,18 @@ export const ProjectSearchResult = ({ project }) => { '' ) }, + { + title: 'Also deposited under', + value: + project.external_accessions.length > 0 ? ( + + ) : ( + '' + ) + }, { title: 'Additional Sample Metadata Fields', value: project.additional_metadata_keys @@ -41,7 +54,7 @@ export const ProjectSearchResult = ({ project }) => { {d.value} ) : ( - Not Available + Not Specified )} diff --git a/client/src/pages/projects/[scpca_id].js b/client/src/pages/projects/[scpca_id].js index 5a03b115..6fca7b8c 100644 --- a/client/src/pages/projects/[scpca_id].js +++ b/client/src/pages/projects/[scpca_id].js @@ -5,6 +5,7 @@ import { ProjectHeader } from 'components/ProjectHeader' import { DetailsTable } from 'components/DetailsTable' import { ProjectAbstractDetail } from 'components/ProjectAbstractDetail' import { ProjectPublicationsDetail } from 'components/ProjectPublicationsDetail' +import { ProjectExternalAccessionsDetail } from 'components/ProjectExternalAccessionsDetail' import { ProjectSamplesTable } from 'components/ProjectSamplesTable' import { ProjectSamplesSummaryTable } from 'components/ProjectSamplesSummaryTable' import { Link } from 'components/Link' @@ -49,6 +50,17 @@ const Project = ({ project }) => { '' ) }, + { + label: 'Also deposited under', + value: + project.external_accessions.length > 0 ? ( + + ) : ( + '' + ) + }, { label: 'DOI', value: diff --git a/client/src/theme/table.js b/client/src/theme/table.js index b7a4baef..5dd95758 100644 --- a/client/src/theme/table.js +++ b/client/src/theme/table.js @@ -37,7 +37,6 @@ export default { tr td, tr th { background-color: #fff; box-shadow: 1px 0 0 0 #ccc inset, 0 1px 0 0 #ccc inset; - vertical-align: middle; } tr th { box-shadow: 1px 0 0 0 #ccc inset,