Skip to content

Commit

Permalink
primeng: fix patron editor
Browse files Browse the repository at this point in the history
* Removes css class for the professional view.
* Adapts the main search component to the new ui version.
* Fixes several details in the patron editor.

Co-Authored-by: Johnny Mariéthoz <[email protected]>
Co-Authored-by: Bertrand Zuchuat <[email protected]>
  • Loading branch information
jma and Garfield-fr committed Dec 18, 2024
1 parent a557424 commit e671c31
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 26 deletions.
4 changes: 3 additions & 1 deletion rero_ils/jsonschemas/common/cantons-v0.0.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
},
"props": {
"sort": true,
"itemCssClass": "col-lg-4",
"placeholder": "Select an option…",
"sortOrder": "asc",
"filter": true,
"options": [
{
"label": "canton_ag",
Expand Down
1 change: 0 additions & 1 deletion rero_ils/jsonschemas/common/countries-v0.0.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@
"placeholder": "Select an option…",
"sortOrder": "asc",
"filter": true,
"itemCssClass": "col-lg-4",
"options": [
{
"label": "country_aa",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,22 @@
"pattern": "^(https://mef.rero.ch/api/concepts/(gnd|idref|rero)/.*|https://bib.rero.ch/api/local_entities/.*?)$",
"widget": {
"formlyConfig": {
"type": "entityTypeahead",
"type": "entity-autocomplete",
"props": {
"scrollHeight": "600px",
"group": true,
"filters": {
"selected": "concepts_genreForm",
"options": [
{
"label": "Genre, form",
"value": "concepts_genreForm"
}
]
},
"itemCssClass": "col-12"
"queryOptions": {
"type": "mef"
}
}
}
}
Expand All @@ -36,12 +41,5 @@
"type": "string",
"minLength": 1
}
},
"widget": {
"formlyConfig": {
"props": {
"containerCssClass": "row"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
"pattern": "^(https://mef.rero.ch/api/(agents|concepts|places)/(gnd|idref|rero)/.*|https://bib.rero.ch/api/local_entities/.*?)$",
"widget": {
"formlyConfig": {
"type": "entityTypeahead",
"type": "entity-autocomplete",
"props": {
"scrollHeight": "600px",
"group": true,
"filters": {
"default": "bf:Topic",
"selected": "bf:Topic",
"options": [
{
"label": "Topic",
Expand Down Expand Up @@ -48,7 +50,9 @@
}
]
},
"itemCssClass": "col-12"
"queryOptions": {
"type": "mef"
}
}
}
}
Expand All @@ -58,12 +62,5 @@
"type": "string",
"minLength": 1
}
},
"widget": {
"formlyConfig": {
"props": {
"containerCssClass": "row"
}
}
}
}
11 changes: 9 additions & 2 deletions rero_ils/modules/patrons/jsonschemas/patrons/patron-v0.0.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@
"items": {
"title": "Local code",
"type": "string",
"minLength": 1
"minLength": 1,
"widget": {
"formlyConfig": {
"props": {
"hideLabel": true
}
}
}
}
},
"user_id": {
Expand All @@ -57,7 +64,6 @@
"widget": {
"formlyConfig": {
"wrappers": [
"form-field",
"user-id"
]
}
Expand Down Expand Up @@ -200,6 +206,7 @@
"widget": {
"formlyConfig": {
"props": {
"hideLabel": true,
"doNotSubmitOnEnter": true,
"validation": {
"validators": {
Expand Down
1 change: 0 additions & 1 deletion rero_ils/theme/templates/rero_ils/frontpage.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
language="{{ current_i18n.locale.language[:2] }}"
inputstyleclass="md:text-xl w-full"
class="rero-ils-ui"
admin="false"
/>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion rero_ils/theme/templates/rero_ils/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
{%- block navbar_search %}
<main-search-bar
class="flex-grow-1 rero-ils-ui"
admin="false"
inputstyleclass="text-sm py-1 w-full"
placeholder="{{ _('Search') }}"
viewcode="{{ viewcode or config.RERO_ILS_SEARCH_GLOBAL_VIEW_CODE }}"
Expand Down
2 changes: 1 addition & 1 deletion rero_ils/theme/templates/rero_ils/professional.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</head>

<body>
<admin-root class="rero-ils-ui" />
<admin-root />
{{ node_assets('@rero/rero-ils-ui/dist/admin', tags='type="module"') }}
</body>

Expand Down

0 comments on commit e671c31

Please sign in to comment.