From febf1341f9d81b743a94063409dfa7461066ef52 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 22 Apr 2024 11:21:20 +0000 Subject: [PATCH] Bug 36182: Add booksellerid columns to holdings table 1) Apply patch, reset_all 2) Configure holdings_table, visit: /cgi-bin/koha/admin/columns_settings.pl?module=catalogue&page=detail&table=holdings_table 3) Confirm holdings_booksellerid is there and is hidden by default 4) Visit a record: /cgi-bin/koha/catalogue/detail.pl?biblionumber=76 5) Edit one of the items and add a value to field 'e' Source of acquisition 5.5) You may need to click the 'show filters' link in order to have the 'Columns' table button show up 6) Go back to the record and click on the 'Columns' above the table 7) Click 'Source of acquisition'. Confirm it shows as expected Signed-off-by: Lucas Gass --- admin/columns_settings.yml | 6 ++++++ .../html_helpers/tables/items/catalogue_detail.inc | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 1ae17d384b..1615552223 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -406,6 +406,9 @@ modules: columnname: holdings_dateaccessioned - columnname: holdings_datelastborrowed + - + columnname: holdings_booksellerid + is_hidden: 1 - columnname: holdings_barcodes - @@ -469,6 +472,9 @@ modules: columnname: otherholdings_dateaccessioned - columnname: otherholdings_datelastborrowed + - + columnname: otherholdings_booksellerid + is_hidden: 1 - columnname: otherholdings_barcode - 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 24f94a7ac4..60c2bd1c5a 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 @@ -28,6 +28,7 @@ Renewals Date accessioned Date last borrowed + Source of acquisition Barcode URL Copy number @@ -596,6 +597,15 @@ return $date(row.last_checkout_date); } }, + { + data: "me.acquisition_source", + className: "booksellerid", + searchable: true, + orderable: true, + render: function (data, type, row, meta) { + return escape_str(row.acquisition_source); + } + }, { data: "me.external_id", className: "", -- 2.30.2