Bug 37368: Add 'library' to patron search embed

This patch adds the missing library embed from the patron search forms.
This embed is required for the case where a patron is missing both first
and last name or is from a different library group and thus falls into
the 'Patron from library X' block.

I also update the 'Patron from library X' to 'Patron from X' as I feel
it reads more clearly.

Finally, we need to sync the available embeds to ensure 'library' is
embeddable from the different endpoints this search can be triggered on.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Martin Renvoize 2024-07-17 16:43:17 +01:00 committed by Katrin Fischer
parent d4f4190f91
commit 920e4dc4c9
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
6 changed files with 7 additions and 2 deletions

View File

@ -23,6 +23,7 @@
type: string
enum:
- extended_attributes
- library
collectionFormat: csv
produces:
- application/json

View File

@ -83,6 +83,7 @@
type: string
enum:
- extended_attributes
- library
collectionFormat: csv
produces:
- application/json
@ -135,6 +136,7 @@
type: string
enum:
- extended_attributes
- library
collectionFormat: csv
produces:
- application/json

View File

@ -23,6 +23,7 @@
type: string
enum:
- extended_attributes
- library
collectionFormat: csv
produces:
- application/json

View File

@ -260,6 +260,7 @@
type: string
enum:
- extended_attributes
- library
collectionFormat: csv
produces:
- application/json

View File

@ -37,7 +37,7 @@
}
if ( name.replace(' ', '').length == 0 ) {
return _("A patron from library %s".format(patron.library.name));
return _("A patron from %s".format(patron.library.name));
}
if ( config && config.hide_patron_name ) {

View File

@ -381,7 +381,7 @@
[% default_sort_column = "name" %]
[% END %]
[% SET order_column_index = 0 %]
[% SET embed = ['extended_attributes'] %]
[% SET embed = ['extended_attributes','library'] %]
patrons_table = $("#[% table_id | html %]").kohaTable({
"ajax": {
"url": patron_search_url,