From 525ba7e332a29c1ad10417a4650c8d8228a30ba8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 13 Nov 2015 09:18:43 +0000 Subject: [PATCH] Bug 15109: Make name the default sort order for all patron searches Find another place where there is a patron search (add user to a basket, add users to a fund or edit owner of a fund, set a guarantor to a child, etc.). Do a search a confirm that the results are now sorted by name instead of cardnumber. --- acqui/add_user_search.pl | 1 + admin/add_user_search.pl | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt | 1 + members/guarantor_search.pl | 1 + patroncards/add_user_search.pl | 1 + serials/add_user_search.pl | 1 + 6 files changed, 6 insertions(+) diff --git a/acqui/add_user_search.pl b/acqui/add_user_search.pl index 7b8b969..ca302e4 100755 --- a/acqui/add_user_search.pl +++ b/acqui/add_user_search.pl @@ -63,5 +63,6 @@ $template->param( alphabet => ( C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' ), categories => [ C4::Category->all ], branches => [ map { { branchcode => $_->{branchcode}, branchname => $_->{branchname} } } values %$branches ], + aaSorting => 1, ); output_html_with_http_headers( $input, $cookie, $template->output ); diff --git a/admin/add_user_search.pl b/admin/add_user_search.pl index bafc9e1..fdce4be 100755 --- a/admin/add_user_search.pl +++ b/admin/add_user_search.pl @@ -64,5 +64,6 @@ $template->param( alphabet => ( C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' ), categories => [ C4::Category->all ], branches => [ map { { branchcode => $_->{branchcode}, branchname => $_->{branchname} } } values %$branches ], + aaSorting => 1, ); output_html_with_http_headers( $input, $cookie, $template->output ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt index 38d9003..0a50e83 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt @@ -90,6 +90,7 @@ $(document).ready(function(){ 'sPaginationType': 'full_numbers', "iDisplayLength": [% Koha.Preference('PatronsPerPage') %], [% END %] + 'aaSorting': [[[% aaSorting || 0 %], 'asc']], 'bFilter': false, 'bProcessing': true, })); diff --git a/members/guarantor_search.pl b/members/guarantor_search.pl index ac9d1ce..70b28d4 100755 --- a/members/guarantor_search.pl +++ b/members/guarantor_search.pl @@ -55,5 +55,6 @@ $template->param( alphabet => ( C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' ), categories => [ C4::Category->all ], branches => [ map { { branchcode => $_->{branchcode}, branchname => $_->{branchname} } } values %$branches ], + aaSorting => 1, ); output_html_with_http_headers( $input, $cookie, $template->output ); diff --git a/patroncards/add_user_search.pl b/patroncards/add_user_search.pl index bc86076..9bc3685 100755 --- a/patroncards/add_user_search.pl +++ b/patroncards/add_user_search.pl @@ -55,5 +55,6 @@ $template->param( alphabet => ( C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' ), categories => [ C4::Category->all ], branches => [ map { { branchcode => $_->{branchcode}, branchname => $_->{branchname} } } values %$branches ], + aaSorting => 1, ); output_html_with_http_headers( $input, $cookie, $template->output ); diff --git a/serials/add_user_search.pl b/serials/add_user_search.pl index 8fc15af..aa7ffaf 100755 --- a/serials/add_user_search.pl +++ b/serials/add_user_search.pl @@ -55,5 +55,6 @@ $template->param( alphabet => ( C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' ), categories => [ C4::Category->all ], branches => [ map { { branchcode => $_->{branchcode}, branchname => $_->{branchname} } } values %$branches ], + aaSorting => 1, ); output_html_with_http_headers( $input, $cookie, $template->output ); -- 2.1.0