From a867743f94402b475fcc3d62897ec6a23b2bec22 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 12 Mar 2020 14:50:57 +0000 Subject: [PATCH] Bug 15668: Add column configuration to the items table in staff detail pages To test: 1 - Apply patches 2 - View biblio details in staff client 3 - Should be able to toggle columns 4 - Go to admin columns settings 5 - Change some settings, verify they work 6 - Enable SeparateHoldings 7 - Go to a record that has holdings from 2 different branches 8 - Change some settings, verify they work. 9 - Check the Other Holdings Tabs, change some settings make sure they work. 10. - Test all the dataTable functions like the search box, columns, export. make sure they on both tabs Signed-off-by: Sally Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- admin/columns_settings.yml | 101 +++++++++++++++++- .../prog/en/modules/catalogue/detail.tt | 56 +++++----- 2 files changed, 129 insertions(+), 28 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 19e0bebb3c..027528b51c 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -249,9 +249,108 @@ modules: cannot_be_toggled: 1 cannot_be_modified: 1 - catalogue: detail: + holdings_table: + - + columnname: holdings_checkbox + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: holdings_itype + - + columnname: holdings_holdingbranch + - + columnname: holdings_homebranch + - + columnname: holdings_ccode + - + columnname: holdings_itemcallnumber + - + columnname: holdings_status + - + columnname: holdings_lastseen + - + columnname: holdings_barcode + - + columnname: holdings_enumchron + - + columnname: holdings_uri + - + columnname: holdings_copynumber + - + columnname: holdings_stocknumber + - + columnname: holdings_materials + - + columnname: holdings_itemnotes + - + columnname: holdings_itemnotes_nonpublic + - + columnname: holdings_hostrecord + - + columnname: holdings_usedin + - + columnname: holdings_usedin_col + - + columnname: holdings_course_reserves + - + columnname: holdings_spinelabel + - + columnname: holdings_actions + cannot_be_toggled: 1 + cannot_be_modified: 1 + + otherholdings_table: + - + columnname: otherholdings_checkbox + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: otherholdings_itype + - + columnname: otherholdings_holdingbranch + - + columnname: otherholdings_homebranch + - + columnname: otherholdings_ccode + - + columnname: otherholdings_itemcallnumber + - + columnname: otherholdings_status + - + columnname: otherholdings_lastseen + - + columnname: otherholdings_barcode + - + columnname: otherholdings_enumchron + - + columnname: otherholdings_uri + - + columnname: otherholdings_copynumber + - + columnname: otherholdings_stocknumber + - + columnname: otherholdings_materials + - + columnname: otherholdings_itemnotes + - + columnname: otherholdings_itemnotes_nonpublic + - + columnname: otherholdings_hostrecord + - + columnname: otherholdings_usedin + - + columnname: otherholdings_usedin_col + - + columnname: otherholdings_course_reserves + - + columnname: otherholdings_spinelabel + - + columnname: otherholdings_actions + cannot_be_toggled: 1 + cannot_be_modified: 1 + acquisitiondetails-table: - columnname: vendor diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 1091b50059..1d9041396d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -225,34 +225,34 @@ - [% IF (StaffDetailItemSelection) %][% END %] - [% IF ( item_level_itypes ) %][% END %] - - - [% IF ( itemdata_ccode ) %][% END %] - + [% IF (StaffDetailItemSelection) %][% END %] + [% IF ( item_level_itypes ) %][% END %] + + + [% IF ( itemdata_ccode ) %][% END %] + [% IF volinfo %] - [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting%] - + [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting%] + [% ELSE %] - + [% END %] [% END %] - - - - - [% IF ( itemdata_uri ) %][% END %] - [% IF ( itemdata_copynumber ) %][% END %] - [% IF ( itemdata_stocknumber ) %][% END %] - [% IF materials %][% END %] - [% IF ( itemdata_itemnotes ) %][% END %] - [% IF ( itemdata_nonpublicnotes ) %][% END %] - [% IF ( hostrecords ) %][% END %] - [% IF ( analyze ) %][% END %] - [% IF ( ShowCourseReserves ) %][% END %] - [% IF ( SpineLabelShowPrintOnBibDetails ) %][% END %] - [% IF ( CAN_user_editcatalogue_edit_items ) %][% END %] + + + + + [% IF ( itemdata_uri ) %][% END %] + [% IF ( itemdata_copynumber ) %][% END %] + [% IF ( itemdata_stocknumber ) %][% END %] + [% IF materials %][% END %] + [% IF ( itemdata_itemnotes ) %][% END %] + [% IF ( itemdata_nonpublicnotes ) %][% END %] + [% IF ( hostrecords ) %][% END %] + [% IF ( analyze ) %][% END %] + [% IF ( ShowCourseReserves ) %][% END %] + [% IF ( SpineLabelShowPrintOnBibDetails ) %][% END %] + [% IF ( CAN_user_editcatalogue_edit_items ) %][% END %] @@ -1115,7 +1115,7 @@ Note that permanent location is a code, and location may be an authval. $(document).ready(function() { var ids = ['holdings_table', 'otherholdings_table']; - + var columns_settings = [ [% ColumnsSettings.GetColumns('catalogue', 'detail','holdings_table','json') | $raw %], [% ColumnsSettings.GetColumns('catalogue', 'detail','otherholdings_table','json') | $raw %] ]; for (var i in ids) { var id = ids[i]; var dt_parameters = { @@ -1125,9 +1125,11 @@ Note that permanent location is a code, and location may be an authval. "aoColumnDefs": [ { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, { "sType": "title-string", "aTargets" : [ "title-string" ] } - ] + ], + "bKohaColumnsUseNames": true, + "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', }; - var table = KohaTable(id, dt_parameters, null, 'with_filters'); + var table = KohaTable(id, dt_parameters, columns_settings[i], 'with_filters'); } [% IF Koha.Preference('AcquisitionDetails') %] -- 2.39.5
Item typeCurrent locationHome libraryCollectionCall numberItem typeCurrent locationHome libraryCollectionCall numberSerial enumeration / chronologySerial enumeration / chronologySerial enumeration / chronologySerial enumeration / chronologyStatusLast seenDate accessionedBarcodeURLCopy numberInventory numberMaterials specifiedPublic notesNon-public notesHost recordsUsed inCourse ReservesSpine label StatusLast seenDate accessionedBarcodeURLCopy numberInventory numberMaterials specifiedPublic notesNon-public notesHost recordsUsed inCourse ReservesSpine label