From 8c6f4f5160107e8321a3d548f951c6b0ef3af76b 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 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. Signed-off-by: Mirko Tietgen --- .../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 eaae5d7..1413f07 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