Skip to content
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

deposits: add license #327

Merged
merged 1 commit into from
Oct 26, 2020
Merged

deposits: add license #327

merged 1 commit into from
Oct 26, 2020

Conversation

sebdeleze
Copy link
Contributor

This PR aims to add a license to deposit and document records. Moreover, the usageAndAccessPolicy will be added when a record is imported from RERO DOC.

  • Creates a JSON schema for license property.
  • Creates the usageAndAccessPolicy property in documents when the document is created from a deposit.
  • Updates the usageAndAccessPolicy property of documents to match the specs.
  • Adds a license property in deposit's JSON schema.
  • Updates the conversion of field 540$a to match the new structure of the usageAndAccessPolicy property.
  • Adds a default license for RERO DOC documents if the license is not set.
  • Makes the field usageAndAccessPolicy available when a document is serialized.
  • Displays the license in document's detail view.
  • Closes Add field licence on step "diffusion" of deposit #324.

Co-Authored-by: Sébastien Délèze [email protected]

@sebdeleze sebdeleze marked this pull request as ready for review September 29, 2020 06:35
@sebdeleze sebdeleze requested a review from jma September 29, 2020 06:35
sonar/modules/documents/dojson/rerodoc/model.py Outdated Show resolved Hide resolved
@@ -319,7 +319,15 @@
}
},
"usageAndAccessPolicy": {
"type": "text"
"type": "object",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand why this property name is different between document and deposit...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the deposit schema has been done a long time before adding the usageAndAccessPolicy property in document schemas. And I don't have the time to refactor it.

{% if record.usageAndAccessPolicy %}
<p>
<small>
{% if record.usageAndAccessPolicy.label %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have logos in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the proposition, I will add a card in the kanban for this.

@pronguen pronguen self-requested a review October 21, 2020 12:53
Copy link
Contributor

@pronguen pronguen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • License text should be translated (esp. the "Not OA...")
  • The license should be displayed with a label "License" just before the permalink. 1st line with the content of usageAndAccessPolicy.license; 2nd line below without new label, with the content of usageAndAccessPolicy.label

image

This PR aims to add a license to deposit and document records. Moreover, the `usageAndAccessPolicy` will be added when a record is imported from RERO DOC.

* Creates a JSON schema for license property.
* Creates the `usageAndAccessPolicy` property in documents when the document is created from a deposit.
* Updates the `usageAndAccessPolicy` property of documents to match the specs.
* Adds a `license` property in deposit's JSON schema.
* Updates the conversion of field `540$a` to match the new structure of the `usageAndAccessPolicy` property.
* Adds a default license for RERO DOC documents if the license is not set.
* Makes the field `usageAndAccessPolicy` available when a document is serialized.
* Displays the license in document's detail view.
* Closes #324.

Co-Authored-by: Sébastien Délèze <[email protected]>
@sebdeleze
Copy link
Contributor Author

  • License text should be translated (esp. the "Not OA...")

The license value is marked for being translated. The extraction of this messages will be done in another PR on branch translations.

  • The license should be displayed with a label "License" just before the permalink. 1st line with the content of usageAndAccessPolicy.license; 2nd line below without new label, with the content of usageAndAccessPolicy.label

Done

@sebdeleze sebdeleze merged commit e26dca4 into rero:dev Oct 26, 2020
@sebdeleze sebdeleze deleted the sed-deposit-license branch October 26, 2020 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add field licence on step "diffusion" of deposit
3 participants