Skip to content

Commit

Permalink
editor: adjust some elements on document jsonschema
Browse files Browse the repository at this point in the history
* Fixes the control of the availability of information on hidExpression.
* Updates the contribution field.
* Closes rero#728.
* Closes rero#739.
* Closes rero#740.

Co-Authored-by: Bertrand Zuchuat <[email protected]>
  • Loading branch information
Garfield-fr committed Jan 31, 2022
1 parent 2422b85 commit 2b74b54
Show file tree
Hide file tree
Showing 2 changed files with 325 additions and 207 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@
"minLength": 1,
"pattern": "^[0-9]+$",
"form": {
"hideExpression": "!['coar:c_beb9', 'coar:c_6501', 'coar:c_998f', 'coar:c_dcae04bc'].includes(field.parent.parent.model.documentType)",
"hideExpression": "field.parent.parent.model && !['coar:c_beb9', 'coar:c_6501', 'coar:c_998f', 'coar:c_dcae04bc'].includes(field.parent.parent.model.documentType)",
"templateOptions": {
"placeholder": "Example: 1"
},
Expand All @@ -590,7 +590,7 @@
"minLength": 1,
"pattern": "^[0-9]+$",
"form": {
"hideExpression": "!['coar:c_beb9', 'coar:c_6501', 'coar:c_998f', 'coar:c_dcae04bc'].includes(field.parent.parent.model.documentType)",
"hideExpression": "field.parent.parent.model && !['coar:c_beb9', 'coar:c_6501', 'coar:c_998f', 'coar:c_dcae04bc'].includes(field.parent.parent.model.documentType)",
"templateOptions": {
"placeholder": "Example: 10"
},
Expand Down Expand Up @@ -633,12 +633,12 @@
"minLength": 1
},
"form": {
"hideExpression": "['coar:c_6501'].includes(field.parent.parent.model.documentType)"
"hideExpression": "field.parent.parent.model && ['coar:c_6501'].includes(field.parent.parent.model.documentType)"
}
},
"publisher": {
"title": "Publication statement",
"definition": "Place, publisher and date of the host document. For example: Paris : PUF, 2016",
"description": "Publication statement of the host document if it is a book, for example \"Paris : PUF, 2016\"",
"type": "string",
"minLength": 1
},
Expand Down Expand Up @@ -697,7 +697,7 @@
}
},
"form": {
"hideExpression": "!['coar:c_3248', 'coar:c_5794', 'coar:c_6670', 'coar:c_3e5a', 'coar:c_beb9', 'coar:c_6501', 'coar:c_998f', 'coar:c_dcae04bc'].includes(field.parent.model.documentType)",
"hideExpression": "field.parent.model && !['coar:c_3248', 'coar:c_5794', 'coar:c_6670', 'coar:c_3e5a', 'coar:c_beb9', 'coar:c_6501', 'coar:c_998f', 'coar:c_dcae04bc'].includes(field.parent.model.documentType)",
"templateOptions": {
"wrappers": [
"card"
Expand Down Expand Up @@ -899,7 +899,7 @@
"degree"
],
"form": {
"hideExpression": "!['coar:c_46ec', 'coar:c_7a1f', 'coar:c_db06', 'coar:c_bdcc', 'habilitation_thesis', 'advanced_studies_thesis', 'other'].includes(field.parent.model.documentType)",
"hideExpression": "field.parent.model && !['coar:c_46ec', 'coar:c_7a1f', 'coar:c_db06', 'coar:c_bdcc', 'habilitation_thesis', 'advanced_studies_thesis', 'other'].includes(field.parent.model.documentType)",
"templateOptions": {
"wrappers": [
"card"
Expand Down
Loading

0 comments on commit 2b74b54

Please sign in to comment.