From 7d78cae2841ee4f60325cb7f31cecce27cab01e4 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 31 Aug 2020 12:33:19 +0000 Subject: [PATCH] Bug 26262: (follow-up) Fix course details page, default configuration Bug 25287 changed the default DataTable configuration in the OPAC so that tables are paginated by default. This is inconsistent with the way we currently use DataTables in the OPAC, and the change was probably unintentional. This patch returns the default pagination configuration to what it was before: Off. The patch also updates opac-course-details.tt with the same DOM configuration as opac-course-reserves.tt. To test, apply the patch and view the list of course reserves and the list of titles attached to a course. In both cases there should be no pagination controls, and the tables should show all results. Signed-off-by: Alexis Ripetti Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart --- .../opac-tmpl/bootstrap/en/modules/opac-course-details.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/js/datatables.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt index ccf76d3716..fc97a0d07c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt @@ -122,7 +122,7 @@ $(document).ready(function() { columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'course-items-table', 'json' ) | $raw %]; KohaTable("#course-items-table", { - "dom": '<"top"flp>rt<"clear">', + "dom": '<"top"f>rt<"clear">', "sorting": [[ 1, "asc" ]], "autoWidth": false, }, columns_settings ); diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js index bc51357529..e201097724 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js @@ -31,6 +31,7 @@ var dataTablesDefaults = { } }, "dom": 't', + "paginate": false, "buttons": [{ fade: 100, className: "dt_button_clear_filter", @@ -48,8 +49,6 @@ var dataTablesDefaults = { node.addClass("disabled"); } }], - "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, window.MSG_DT_ALL || "All" ]], - "iDisplayLength": 20, initComplete: function( settings) { var tableId = settings.nTable.id // When the DataTables search function is triggered, -- 2.39.5