Skip to content

Commit

Permalink
entity: configure the editor
Browse files Browse the repository at this point in the history
- Configures the entity type select in the editor.
- Uses only one identifier definition.
- Fixes oneOf configurations.
- Fixes editor UI layout.
- Fixes $ref resolution in during the document importation.
- Uses the dump method in the serializer when the resolve=1.
- Fixes aggregations size configuration.
- Fixes query boosting.
- Fixes autocomplete max length.
- Closes #2619.

Co-authored-by: Johnny Mariéthoz <[email protected]>
  • Loading branch information
jma committed Apr 6, 2023
1 parent 4039b97 commit 9808182
Show file tree
Hide file tree
Showing 24 changed files with 239 additions and 195 deletions.
8 changes: 4 additions & 4 deletions rero_ils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2053,7 +2053,7 @@ def _(x):
# This does not take into account
# env variable or instance config file
size=RERO_ILS_AGGREGATION_SIZE.get(
'contribution', RERO_ILS_DEFAULT_AGGREGATION_SIZE)
'entity', RERO_ILS_DEFAULT_AGGREGATION_SIZE)
)
),
type=dict(
Expand All @@ -2062,7 +2062,7 @@ def _(x):
# This does not take into account
# env variable or instance config file
size=RERO_ILS_AGGREGATION_SIZE.get(
'contribution', RERO_ILS_DEFAULT_AGGREGATION_SIZE)
'entity', RERO_ILS_DEFAULT_AGGREGATION_SIZE)
)
)
),
Expand Down Expand Up @@ -2251,8 +2251,8 @@ def _(x):
'documents': {
'autocomplete_title': 3,
'title\.*': 3,
'contribution.name': 2,
'contribution.name_*': 2,
'contribution.entity.authorized_access_point_*': 2,
'contribution.entity.authorized_access_point': 2,
'publicationYearText': 2,
'freeFormedPublicationDate': 2,
'subjects.term': 2,
Expand Down
2 changes: 1 addition & 1 deletion rero_ils/es_templates/v7/record.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"edge_ngram_filter": {
"type": "edge_ngram",
"min_gram": 3,
"max_gram": 10
"max_gram": 30
},
"french_elision": {
"type": "elision",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,12 @@
"entity": {
"$ref": "https://bib.rero.ch/schemas/documents/document_entity_local-v0.0.1.json"
}
},
"form": {
"hide": true,
"templateOptions": {
"cssClass": "editor-title"
}
}
},
"form": {
"hide": true,
"templateOptions": {
"cssClass": "editor-title"
}
}
},
Expand All @@ -281,12 +281,12 @@
"entity": {
"$ref": "https://bib.rero.ch/schemas/documents/document_genre_form_local-v0.0.1.json"
}
},
"form": {
"hide": true,
"templateOptions": {
"cssClass": "editor-title"
}
}
},
"form": {
"hide": true,
"templateOptions": {
"cssClass": "editor-title"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"oneOf": [
{
"title": "bf:Classification",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"type",
Expand All @@ -20,7 +21,6 @@
"type",
"classificationPortion"
],
"type": "object",
"properties": {
"type": {
"title": "Type",
Expand Down Expand Up @@ -50,6 +50,7 @@
},
{
"title": "bf:ClassificationLcc",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"type",
Expand All @@ -61,7 +62,6 @@
"type",
"classificationPortion"
],
"type": "object",
"properties": {
"type": {
"title": "Type",
Expand Down Expand Up @@ -91,6 +91,7 @@
},
{
"title": "bf:ClassificationNlm",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"type",
Expand All @@ -102,7 +103,6 @@
"type",
"classificationPortion"
],
"type": "object",
"properties": {
"type": {
"title": "Type",
Expand Down Expand Up @@ -132,6 +132,7 @@
},
{
"title": "bf:ClassificationUdc",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"type",
Expand All @@ -144,7 +145,6 @@
"type",
"classificationPortion"
],
"type": "object",
"properties": {
"type": {
"title": "Type",
Expand Down Expand Up @@ -177,6 +177,7 @@
},
{
"title": "bf:ClassificationDdc",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"type",
Expand All @@ -189,7 +190,6 @@
"type",
"classificationPortion"
],
"type": "object",
"properties": {
"type": {
"title": "Type",
Expand Down Expand Up @@ -222,6 +222,7 @@
},
{
"title": "classification_brunetparguez",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"type",
Expand All @@ -233,7 +234,6 @@
"type",
"classificationPortion"
],
"type": "object",
"properties": {
"type": {
"title": "Type",
Expand Down Expand Up @@ -263,6 +263,7 @@
},
{
"title": "classification_droit",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"type",
Expand All @@ -274,7 +275,6 @@
"type",
"classificationPortion"
],
"type": "object",
"properties": {
"type": {
"title": "Type",
Expand Down Expand Up @@ -342,14 +342,7 @@
}
},
"subdivision": {
"title": "Subdivisions",
"minItems": 1,
"type": "array",
"items": {
"title": "Subdivision",
"type": "string",
"minLength": 2
}
"$ref": "#/definitions/subdivision"
},
"edition": {
"title": "Edition",
Expand All @@ -370,6 +363,7 @@
},
{
"title": "classification_musicale_genres",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"type",
Expand All @@ -381,7 +375,6 @@
"type",
"classificationPortion"
],
"type": "object",
"properties": {
"type": {
"title": "Type",
Expand Down Expand Up @@ -427,7 +420,7 @@
},
"subdivision": {
"title": "Subdivisions",
"minItems": 0,
"minItems": 1,
"type": "array",
"items": {
"title": "Subdivision",
Expand All @@ -451,4 +444,4 @@
"minLength": 1
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"oneOf": [
{
"title": "unknown media",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"contentType"
Expand All @@ -24,6 +25,7 @@
},
{
"title": "rdamt:1001",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"contentType",
Expand Down Expand Up @@ -114,6 +116,7 @@
},
{
"title": "rdamt:1002",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"contentType",
Expand Down Expand Up @@ -209,6 +212,7 @@
},
{
"title": "rdamt:1003",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"contentType",
Expand Down Expand Up @@ -299,6 +303,7 @@
},
{
"title": "rdamt:1004",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"contentType",
Expand Down Expand Up @@ -354,6 +359,7 @@
},
{
"title": "rdamt:1005",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"contentType",
Expand Down Expand Up @@ -449,6 +455,7 @@
},
{
"title": "rdamt:1006",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"contentType",
Expand Down Expand Up @@ -509,6 +516,7 @@
},
{
"title": "rdamt:1007",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"contentType",
Expand Down Expand Up @@ -589,6 +597,7 @@
},
{
"title": "rdamt:1008",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"contentType",
Expand Down Expand Up @@ -659,6 +668,7 @@
},
{
"title": "other",
"type": "object",
"additionalProperties": false,
"propertiesOrder": [
"contentType",
Expand Down Expand Up @@ -855,4 +865,4 @@
}
}
}
}
}
Loading

0 comments on commit 9808182

Please sign in to comment.