-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1748 from sennetconsortium/tjmadonna/1731-collect…
…ions-section Tjmadonna/1731 collections section
- Loading branch information
Showing
7 changed files
with
81 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import SenNetAccordion from "@/components/custom/layout/SenNetAccordion"; | ||
import Card from 'react-bootstrap/Card'; | ||
import ClipboardCopy from "@/components//ClipboardCopy"; | ||
import {getEntityViewUrl} from "@/components/custom/js/functions"; | ||
|
||
function Collections({ entityType, data }) { | ||
const titleType = data.length > 1 ? 'Collections' : 'Collection'; | ||
|
||
const collectionsView = data.map((collection) => | ||
<span key={collection.uuid}> | ||
<a href={getEntityViewUrl('Collection', collection.uuid, {})}>{collection.sennet_id}</a><ClipboardCopy text={collection.sennet_id}/> | ||
| ||
</span> | ||
); | ||
|
||
return ( | ||
<SenNetAccordion title='Associated Collections'> | ||
<Card border={'0'}> | ||
<Card.Body> | ||
<p className='fw-light fs-6'>This <code>{entityType}</code> is contained in the <code>{titleType}</code> | ||
{collectionsView} | ||
</p> | ||
</Card.Body> | ||
</Card> | ||
</SenNetAccordion> | ||
) | ||
} | ||
|
||
export default Collections |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,19 @@ | ||
import React, {useContext, useEffect, useState} from 'react' | ||
import PropTypes from 'prop-types' | ||
import SenNetAccordion from "../../layout/SenNetAccordion"; | ||
import SenNetAccordion from "@/components/custom/layout/SenNetAccordion"; | ||
import Card from 'react-bootstrap/Card'; | ||
import ClipboardCopy from "../../../ClipboardCopy"; | ||
import {getEntityViewUrl} from "../../js/functions"; | ||
import ClipboardCopy from "@/components//ClipboardCopy"; | ||
import {getEntityViewUrl} from "@/components/custom/js/functions"; | ||
|
||
function Upload({ data }) { | ||
useEffect(() => { | ||
}, []) | ||
|
||
return ( | ||
<> | ||
<SenNetAccordion title={'Associated Upload'}> | ||
<Card border={'0'}> | ||
<Card.Body> | ||
<p className='fw-light fs-6'>This <code>Dataset</code> is contained in the data <code>Upload</code> | ||
<a href={getEntityViewUrl('Upload', data.uuid, {})}>{data.sennet_id}</a><ClipboardCopy text={data.sennet_id}/></p> | ||
</Card.Body> | ||
</Card> | ||
</SenNetAccordion> | ||
</> | ||
<SenNetAccordion title={'Associated Upload'}> | ||
<Card border={'0'}> | ||
<Card.Body> | ||
<p className='fw-light fs-6'>This <code>Dataset</code> is contained in the data <code>Upload</code> | ||
<a href={getEntityViewUrl('Upload', data.uuid, {})}>{data.sennet_id}</a><ClipboardCopy text={data.sennet_id}/></p> | ||
</Card.Body> | ||
</Card> | ||
</SenNetAccordion> | ||
) | ||
} | ||
|
||
export default Upload | ||
export default Upload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters