From 95ab261cc41877b8606bde1b84cfc5194c730895 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 b8b39098b5..b4f487d965 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -448,6 +448,9 @@ modules: columnname: holdings_dateaccessioned - columnname: holdings_datelastborrowed + - + columnname: holdings_booksellerid + is_hidden: 1 - columnname: holdings_barcode - @@ -515,6 +518,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 c115c12322..499df7a259 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 @@ -29,6 +29,7 @@ Local uses Date accessioned Date last borrowed + Source of acquisition Barcode URL Copy number @@ -626,6 +627,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.39.5