-
Notifications
You must be signed in to change notification settings - Fork 15
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 #1162 from research-software-directory/1033-licenses
Add more info to software licenses
- Loading branch information
Showing
38 changed files
with
748 additions
and
367 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,47 @@ | ||
// SPDX-FileCopyrightText: 2022 Dusan Mijatovic (dv4all) | ||
// SPDX-FileCopyrightText: 2022 dv4all | ||
// SPDX-FileCopyrightText: 2024 Dusan Mijatovic (Netherlands eScience Center) | ||
// SPDX-FileCopyrightText: 2024 Netherlands eScience Center | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import AttachFileIcon from '@mui/icons-material/AttachFile' | ||
import LaunchIcon from '@mui/icons-material/Launch' | ||
import {LicenseForSoftware} from '~/types/SoftwareTypes' | ||
|
||
export default function AboutLicense({license}:{license:string[]}) { | ||
|
||
function renderLicenses() { | ||
if (license.length === 0) { | ||
return (<i>Not specified</i>) | ||
} | ||
return ( | ||
<ul className="py-1"> | ||
{license.map((item, pos) => { | ||
return <li key={pos}>{ item }</li> | ||
})} | ||
</ul> | ||
) | ||
} | ||
|
||
export default function AboutLicense({licenses}:{licenses:LicenseForSoftware[]}) { | ||
// console.log('AboutLicense...', licenses) | ||
return ( | ||
<> | ||
<div className="pt-8 pb-2"> | ||
<AttachFileIcon color="primary" sx={{transform:'rotate(45deg)'}} /> | ||
<span className="text-primary pl-2">License</span> | ||
</div> | ||
{renderLicenses()} | ||
{licenses.length === 0 ? | ||
<i>Not specified</i> | ||
: | ||
<ul className="py-1"> | ||
{licenses.map((item) => { | ||
return ( | ||
<li key={item.license} title={item.name ?? item.license}> | ||
{ item.reference ? | ||
<a href={item.reference} target='_blank' className="flex items-center"> | ||
{item.license} | ||
<LaunchIcon | ||
sx={{ | ||
width:'1rem', | ||
height:'1rem', | ||
marginLeft: '0.5rem' | ||
}} | ||
/> | ||
</a> | ||
: <span>{item.license}</span> | ||
} | ||
</li> | ||
) | ||
})} | ||
</ul> | ||
} | ||
</> | ||
) | ||
} |
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
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
Oops, something went wrong.