-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a generic ItemPageLicenseFieldComponent #3338
base: main
Are you sure you want to change the base?
Conversation
Hi @abelgomez, |
This PR should be ready for review. Sorry for the long list of commits: when changing from the Since this PR delegates the rendering of CC licenses to the ItemPageCcLicenseFieldComponent, this PR is affected by DSpace/DSpace#9882 and #3165. I opted to keep ItemPageCcLicenseFieldComponent almost as is to avoid breaking any existing installation that relies on it. |
@abelgomez : Could you rebase your changes directly on |
As far as I remember, that was exactly the problem that caused the long list of commits: I rebased main onto my branch but GitHub does not detect that those commits were already on "main". I'll try to fix it, and if I fail, I'll close the PR and open a clean one. |
…er than ItemPageCcLicenseFieldComponent (fixes DSpace#3170)
…nComponent) (fixes DSpace#3167)
* Trailing spaces * Missing trailing commas * Imports sorting * Equalities and typing
…er than ItemPageCcLicenseFieldComponent (fixes DSpace#3170)
…nComponent) (fixes DSpace#3167)
* Trailing spaces * Missing trailing commas * Imports sorting * Equalities and typing
This PR relates to DSpace#3165 and DSpace/DSpace#9882.
I started from scratch, and cherry-picked the interesting commits. Let me know if you want me to also combine several commits into one for a cleaner history. |
Hi @abelgomez, |
References
dc.rights
is a CC license #3170Description
This PR adds a new ItemPageLicenseFieldComponent, which allows showing generic rights information. If the component detects that the rights information points to a Creative Commons license, it delegates the rendering to the existing ItemPageCcLicenseFieldComponent.
If non-default properties are used to indicate CC licenses, they must be exposed in the backend (see DSpace/DSpace#9882).
If the item contains the same numbers of URIs than license names/descriptions, the links will be associated to the names/descriptions in the order they appear. If not, all fields will be explicitly listed (see example below).
Instructions for Reviewers
Create an item with the following properties:
cc.license.uri
: https://www.example.com/licensecc.license
: All rights reservedLicense should be rendered as a license text with a link:
Create an item with the following properties:
cc.license.uri
: https://www.example.com/license1cc.license.uri
: https://www.example.com/license2cc.license
: License 1cc.license
: License 2Licenses should be rendered as list of licenses with links:
Create an item with the following properties:
cc.license.uri
: https://www.example.com/license1cc.license.uri
: https://www.example.com/license2cc.license
: License 1cc.license
: License 2cc.license
: License 3Licenses should render all fields explicitly (and URIs will be rendered as links), since no matching can be established between the license names and the links:
Create an item with the following properties:
cc.license.uri
: https://creativecommons.org/licenses/by-nc-sa/4.0/cc.license
: CC BY-NC-SA 4.0License will be rendered as in DSpace 8 using ItemPageCcLicenseFieldComponent:
NOTE: instructions to test this PR when custom fields are used for the CC license are not given since that requires #3165 to be merged in the main branch. If #3165 is merged, this PR will be updated accordingly with new instructions.
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
main
branch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lint
npm run check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.