From fd4d17ace14052662f78d38eae2084cfefa12b9d Mon Sep 17 00:00:00 2001 From: Jesse Maseto Date: Fri, 2 Mar 2018 13:11:44 +0000 Subject: [PATCH] Bug 19719: Add new column for collection in the patron checkouts data tables MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This makes the collection visible in the checkouts table on the details and issues tab in the patron account in staff. TEST: 1. Check out a few items to patron. 2. View check outs on patron account in staff client. 3. Collection code is not present. 4. Apply patch 5. Notice that not Collection code is visible while viewing check outs. Signed-off-by: Severine QUEUNE Signed-off by: Maksim Sen Signed-off-by: Katrin Fischer Signed-off-by: Séverine QUEUNE Signed-off-by: Julian Maurice Signed-off-by: Nick Clemens --- admin/columns_settings.yml | 4 ++++ .../intranet-tmpl/prog/en/includes/checkouts-table.inc | 1 + .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 1 + koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 10 ++++++++++ svc/checkouts | 3 +++ 5 files changed, 19 insertions(+) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 6f7022db6b..cec35f35de 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -251,6 +251,8 @@ modules: columnname: title - columnname: item_type + - + columnname: collection_code - columnname: location - @@ -406,6 +408,8 @@ modules: columnname: title - columnname: item_type + - + columnname: collection_code - columnname: location - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc index 9bcf7808da..3ac753616a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc @@ -16,6 +16,7 @@ Due date Title Item type + Collection code Location Home library Checked out on diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index c345a264fa..e9d060f2dc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -852,6 +852,7 @@ No patron matched [% message | html %] Due date Title Item type + Collection code Location Checked out on Checked out from diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js index b5edf4843f..c1830af5bb 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -295,6 +295,11 @@ $(document).ready(function() { return oObj.itemtype_description.escapeHtml(); } }, + { + "mDataProp": function ( oObj ) { + return oObj.ccode.escapeHtml(); + } + }, { "mDataProp": function ( oObj ) { return oObj.location.escapeHtml(); @@ -631,6 +636,11 @@ $(document).ready(function() { return oObj.itemtype_description.escapeHtml(); } }, + { + "mDataProp": function ( oObj ) { + return oObj.ccode.escapeHtml(); + } + }, { "mDataProp": function ( oObj ) { return oObj.location.escapeHtml(); diff --git a/svc/checkouts b/svc/checkouts index fefadeeeea..d1fb8d34f9 100755 --- a/svc/checkouts +++ b/svc/checkouts @@ -90,6 +90,8 @@ my $sql = ' items.itype, biblioitems.itemtype, + items.ccode, + borrowernumber, surname, firstname, @@ -171,6 +173,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { barcode => $c->{barcode}, itemtype => $item_level_itypes ? $c->{itype} : $c->{itemtype}, itemtype_description => $itemtype ? $itemtype->translated_description : q{}, + ccode => $c->{ccode}, location => $location, homebranch => $c->{homebranch}, itemnotes => $c->{itemnotes}, -- 2.39.5