From 3c877edd57418e968b87c0118b9b4a6b4b4fd471 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Tue, 5 Jan 2016 12:24:57 +0100 Subject: [PATCH] Bug 15471: Add column settings and filters to Holds queue table Add column visibility menu using DataTables Buttons Add a text filter on top of each column Also extend page width so that the large table is better centered Depends on bug 15285 Test plan 1. Go to Holds queue page (circ/view_holdsqueue.pl) 2. Check that table sorting and filtering work well and that you can hide each column 3. Go to Admin > Configure columns and change the settings for this table (Circulation > view_holdsqueue > holds-table). Verify that the settings work by going again to the Holds queue page 4. Check that filters continue to work after hiding some columns --- admin/columns_settings.yml | 25 ++++++ koha-tmpl/intranet-tmpl/prog/en/css/datatables.css | 4 +- .../prog/en/modules/circ/view_holdsqueue.tt | 95 ++++++++++++++++++++-- 3 files changed, 113 insertions(+), 11 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 3849245..5df613e 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -314,3 +314,28 @@ modules: columnname: export cannot_be_toggled: 1 cannot_be_modified: 1 + + view_holdsqueue: + holds-table: + - + columnname: title + - + columnname: collection: + - + columnname: document_type + - + columnname: callnumber + - + columnname: copynumber + - + columnname: enumeration + - + columnname: barcode + - + columnname: patron + - + columnname: send_to + - + columnname: date + - + columnname: notes diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css b/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css index 1f92947..2912f8c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css @@ -239,10 +239,10 @@ tr.even.selected td { } /* ColumnFilter */ -span.filter_column > input.text_filter { +span.filter_column > input[type="text"] { font-size: 80%; width: 100%; - padding: 0; + box-sizing: border-box; } /* Row grouping */ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt index e419bcd..461a8da 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt @@ -2,29 +2,49 @@ [% USE ItemTypes %] [% USE Branches %] [% USE AuthorisedValues %] +[% USE ColumnsSettings %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Holds queue [% INCLUDE 'doc-head-close.inc' %] - - -[% INCLUDE 'header.inc' %] -[% INCLUDE 'cat-search.inc' %] [% INCLUDE 'datatables.inc' %] +[% INCLUDE 'columns_settings.inc' %] + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'cat-search.inc' %] -
+
@@ -51,7 +71,7 @@ $(document).ready(function() { [% IF ( itemsloop ) %] - + @@ -64,6 +84,63 @@ $(document).ready(function() { + + + + + + + + + + + + + [% FOREACH itemsloo IN itemsloop %] -- 1.9.1
Title Collection Item typeDate Notes
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +