From fd164da400f48af2907dbccb677ce760d2ddba85 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 20 Dec 2024 21:31:54 +0000 Subject: [PATCH] Bug 15461: Add stand alone shevling location column to holdings table To test: 1. APPLY patch and restart_all 2. Go the detail page for some records and see the shelving location column. 3. Make sure the data looks correct 4. Try Table settings to make sure the column can be properly hidden NOTE: You cannot currently search the holdins table for AV descriptions, only the code. --- admin/columns_settings.yml | 4 ++++ .../html_helpers/tables/items/catalogue_detail.inc | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index cf3beff558..d8d7e2d79a 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -434,6 +434,8 @@ modules: columnname: holdingbranch - columnname: homebranch + - + columnname: location - columnname: ccode - @@ -505,6 +507,8 @@ modules: columnname: holdingbranch - columnname: homebranch + - + columnname: location - columnname: ccode - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc index f6ce0667c3..731ce5ab5d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -16,6 +16,7 @@ [% IF ( item_level_itypes ) %]Item type[% END %] Current library Home library + Shelving location Collection [% IF Koha.Preference('EnableItemGroups') %] Item group @@ -391,8 +392,15 @@ searchable: true, orderable: true, render: function (data, type, row, meta) { - let nodes = '%s'.format(escape_str(row._strings.home_library_id ? row._strings.home_library_id.str : row.home_library_id)); - nodes += '' + return escape_str(row._strings.home_library_id ? row._strings.home_library_id.str : row.home_library_id); + } + }, + { + data: "me.location", + searchable: true, + orderable: true, + render: function (data, type, row, meta) { + let nodes = ''; [%# If permanent location is defined, show description or code and %] [%# display current location in parentheses. If not, display current location. %] [%# Note that permanent location is a code, and location may be an authval. %] -- 2.39.2