Skip to content

Commit b116a0c

Browse files
jmaGarfield-fr
andcommitted
primeng: fix patron editor
* 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]>
1 parent 0681131 commit b116a0c

File tree

8 files changed

+27
-26
lines changed

8 files changed

+27
-26
lines changed

rero_ils/jsonschemas/common/cantons-v0.0.1.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
},
3838
"props": {
3939
"sort": true,
40-
"itemCssClass": "col-lg-4",
40+
"placeholder": "Select an option…",
41+
"sortOrder": "asc",
42+
"filter": true,
4143
"options": [
4244
{
4345
"label": "canton_ag",

rero_ils/jsonschemas/common/countries-v0.0.1.json

-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@
385385
"placeholder": "Select an option…",
386386
"sortOrder": "asc",
387387
"filter": true,
388-
"itemCssClass": "col-lg-4",
389388
"options": [
390389
{
391390
"label": "country_aa",

rero_ils/modules/documents/jsonschemas/documents/document_genre_form_link-v0.0.1.json

+7-9
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,22 @@
1616
"pattern": "^(https://mef.rero.ch/api/concepts/(gnd|idref|rero)/.*|https://bib.rero.ch/api/local_entities/.*?)$",
1717
"widget": {
1818
"formlyConfig": {
19-
"type": "entityTypeahead",
19+
"type": "entity-autocomplete",
2020
"props": {
21+
"scrollHeight": "600px",
22+
"group": true,
2123
"filters": {
24+
"selected": "concepts_genreForm",
2225
"options": [
2326
{
2427
"label": "Genre, form",
2528
"value": "concepts_genreForm"
2629
}
2730
]
2831
},
29-
"itemCssClass": "col-12"
32+
"queryOptions": {
33+
"type": "mef"
34+
}
3035
}
3136
}
3237
}
@@ -36,12 +41,5 @@
3641
"type": "string",
3742
"minLength": 1
3843
}
39-
},
40-
"widget": {
41-
"formlyConfig": {
42-
"props": {
43-
"containerCssClass": "row"
44-
}
45-
}
4644
}
4745
}

rero_ils/modules/documents/jsonschemas/documents/document_subjects_entity_link-v0.0.1.json

+7-10
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
"pattern": "^(https://mef.rero.ch/api/(agents|concepts|places)/(gnd|idref|rero)/.*|https://bib.rero.ch/api/local_entities/.*?)$",
1818
"widget": {
1919
"formlyConfig": {
20-
"type": "entityTypeahead",
20+
"type": "entity-autocomplete",
2121
"props": {
22+
"scrollHeight": "600px",
23+
"group": true,
2224
"filters": {
23-
"default": "bf:Topic",
25+
"selected": "bf:Topic",
2426
"options": [
2527
{
2628
"label": "Topic",
@@ -48,7 +50,9 @@
4850
}
4951
]
5052
},
51-
"itemCssClass": "col-12"
53+
"queryOptions": {
54+
"type": "mef"
55+
}
5256
}
5357
}
5458
}
@@ -58,12 +62,5 @@
5862
"type": "string",
5963
"minLength": 1
6064
}
61-
},
62-
"widget": {
63-
"formlyConfig": {
64-
"props": {
65-
"containerCssClass": "row"
66-
}
67-
}
6865
}
6966
}

rero_ils/modules/patrons/jsonschemas/patrons/patron-v0.0.1.json

+9-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@
4747
"items": {
4848
"title": "Local code",
4949
"type": "string",
50-
"minLength": 1
50+
"minLength": 1,
51+
"widget": {
52+
"formlyConfig": {
53+
"props": {
54+
"hideLabel": true
55+
}
56+
}
57+
}
5158
}
5259
},
5360
"user_id": {
@@ -57,7 +64,6 @@
5764
"widget": {
5865
"formlyConfig": {
5966
"wrappers": [
60-
"form-field",
6167
"user-id"
6268
]
6369
}
@@ -200,6 +206,7 @@
200206
"widget": {
201207
"formlyConfig": {
202208
"props": {
209+
"hideLabel": true,
203210
"doNotSubmitOnEnter": true,
204211
"validation": {
205212
"validators": {

rero_ils/theme/templates/rero_ils/frontpage.html

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
language="{{ current_i18n.locale.language[:2] }}"
4444
inputstyleclass="md:text-xl w-full"
4545
class="rero-ils-ui"
46-
admin="false"
4746
/>
4847
</div>
4948
</div>

rero_ils/theme/templates/rero_ils/header.html

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
{%- block navbar_search %}
3636
<main-search-bar
3737
class="flex-grow-1 rero-ils-ui"
38-
admin="false"
3938
inputstyleclass="text-sm py-1 w-full"
4039
placeholder="{{ _('Search') }}"
4140
viewcode="{{ viewcode or config.RERO_ILS_SEARCH_GLOBAL_VIEW_CODE }}"

rero_ils/theme/templates/rero_ils/professional.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</head>
3232

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

0 commit comments

Comments
 (0)