Bug 15109: Make name the default sort order for all patron searches
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 13 Nov 2015 09:18:43 +0000 (09:18 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 17 Nov 2015 12:49:21 +0000 (09:49 -0300)
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.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
acqui/add_user_search.pl
admin/add_user_search.pl
koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt
members/guarantor_search.pl
patroncards/add_user_search.pl
serials/add_user_search.pl

index 7b8b969..ca302e4 100755 (executable)
@@ -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 );
index bafc9e1..fdce4be 100755 (executable)
@@ -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 );
index 38d9003..0a50e83 100644 (file)
@@ -90,6 +90,7 @@ $(document).ready(function(){
             'sPaginationType': 'full_numbers',
             "iDisplayLength": [% Koha.Preference('PatronsPerPage') %],
         [% END %]
+        'aaSorting': [[[% aaSorting || 0 %], 'asc']],
         'bFilter': false,
         'bProcessing': true,
     }));
index ac9d1ce..70b28d4 100755 (executable)
@@ -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 );
index bc86076..9bc3685 100755 (executable)
@@ -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 );
index 8fc15af..aa7ffaf 100755 (executable)
@@ -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 );