From fc8b1745c363c510f53ce18347c9a72ca6665828 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 12 Feb 2016 10:11:29 -0500 Subject: [PATCH] Bug 15793 - UX of circulation patron search with long lists of returned borrowers Content-Type: text/plain; charset="utf-8" Using form controls to select a patron from the list of patron search results during checkout means that we have to have a submit button somewhere on a potentially very long form. This patch proposes that we use links to the patron records instead. This patch also makes a minor correction to the template to allow for the correct layout grid to be used, and enables the display of full library names in search results instead of branchcode. To test, apply the patch and search for a patron name from the "Check out" form in the header. Clicking the name of any patron in the search results should take you to the correct checkout page. --- .../prog/en/modules/circ/circulation.tt | 41 ++++------------------ 1 file changed, 7 insertions(+), 34 deletions(-) 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 6fd722c..122c2a6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -103,21 +103,10 @@ $(document).ready(function() { }); var table = $("#table_borrowers").dataTable($.extend(true, {}, dataTablesDefaults, { - "aoColumnDefs": [ - { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }, - ], - "aaSorting": [ 2, "asc" ], + "aaSorting": [ 1, "asc" ], "sDom": "t", "iDisplayLength": -1 })); - $(table).find('tbody tr').filter(':has(:radio:checked)').end().click(function(event) { - $('#table_borrowers tbody tr').removeClass('selected'); - $(this).addClass('selected'); - if (event.target.type !== 'radio') { - $(':radio', this).attr('checked', 'true') - } - }); - }); //]]> @@ -135,7 +124,7 @@ $(document).ready(function() { Checkouts [% END %] -[% IF ( $borrowers ) %] +[% IF ( borrowers || message ) %]
@@ -555,25 +544,13 @@ No patron matched [% message %] [% END %] [% IF ( borrowers ) %] -[% INCLUDE 'patron-toolbar.inc' %] - -
- -
- Patron selection - -[% IF (forceallow) %][% END %] - - - - - + [% INCLUDE 'patron-toolbar.inc' %] +

Patron selection

- - + @@ -582,19 +559,15 @@ No patron matched [% message %] [% FOREACH borrower IN borrowers %] - - + - + [% END %]
NameCardnumberCard number Category Library Address
[% borrower.surname %], [% borrower.firstname %][% borrower.surname %], [% borrower.firstname %] [% borrower.cardnumber %] [% borrower.categorycode %][% borrower.branchcode %][% Branches.GetName( borrower.branchcode ) %] [% borrower.address %]
-
-
-
[% ELSE %] -- 2.1.4