From 565bf8a0069e6882361e1a9353eb2cc0722318ac Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 11 Feb 2022 14:03:36 +0100 Subject: [PATCH] Bug 30063: Make the main patron search use the REST API MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To test: * Length menu (PatronsPerPage) * Query description * Highlight of the current library * sticky header - Does not work (?) If the table does not show when you submit the filter form, make sure you regenerated the compiled CSS. Signed-off-by: Séverine Queune Signed-off-by: Martin Renvoize Signed-off-by: Fridolin Somers --- .../prog/en/includes/patron-search-header.inc | 2 +- .../prog/en/includes/patron-search.inc | 311 ++++++++++++--- .../prog/en/includes/patronfields.inc | 2 +- .../prog/en/modules/members/member.tt | 376 ++---------------- .../prog/en/modules/members/search.tt | 4 +- members/member.pl | 4 + members/members-home.pl | 4 + 7 files changed, 296 insertions(+), 407 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc index 1aa4695213..e7f794d018 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc @@ -24,7 +24,7 @@

- [% FOR column IN columns %] - [% SWITCH column %] + [% FOR f IN filters %] + [% SWITCH f %] [% CASE 'branch' %]

  • @@ -47,11 +48,43 @@ [% END %]
  • + [% CASE 'search_field' %] +
  • + + +
  • + [% CASE 'search_type' %] +
  • + + +
  • [% END %] [% END %]
    +
    @@ -78,12 +111,14 @@ [% END %] + +

    Patrons found for:

    + @@ -130,76 +110,7 @@
    @@ -234,16 +145,8 @@ [% INCLUDE 'datatables.inc' %] [% INCLUDE 'columns_settings.inc' %] [% INCLUDE 'str/members-menu.inc' %] - [% Asset.js("lib/hc-sticky.js") | $raw %] [% Asset.js("js/members-menu.js") | $raw %] + + [% IF circsearch == 1 %] + [% SET redirect_url = '/cgi-bin/koha/circ/circulation.pl' %] + [% ELSE %] + [% SET redirect_url = '/cgi-bin/koha/members/moremember.pl' %] + [% END %] + [% PROCESS patron_search_js + table_id => 'memberresultst', + categories => categories, + libraries => libraries, + extended_attribute_types => attribute_type_codes, + columns => columns, + actions => ['edit', 'checkout'], + redirect_if_one_result => 1, + redirect_url => redirect_url, + sticky_header => "searchheader", + sticky_to => "patron_search_results", + %] + + [% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/search.tt index 0106acc4ce..ba77fb046e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/search.tt @@ -17,7 +17,7 @@