@@ -, +, @@
API
---
.../en/includes/js-patron-format-address.inc | 110 +++-
.../prog/en/includes/patron-search.inc | 502 ++++++++++++++++++
.../prog/en/modules/members/search.tt | 392 +-------------
.../prog/en/modules/reserve/request.tt | 127 ++---
.../modules/reserve/tables/members_results.tt | 32 --
members/search.pl | 1 -
reserve/request.pl | 10 +-
7 files changed, 659 insertions(+), 515 deletions(-)
create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/reserve/tables/members_results.tt
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format-address.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format-address.inc
@@ -1,20 +1,112 @@
+[% USE raw %]
+[% USE To %]
+[% USE AuthorisedValues %]
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
@@ -0,0 +1,502 @@
+[% USE Koha %]
+[% USE Branches %]
+[% USE raw %]
+[% USE To %]
+
+[% BLOCK patron_search_filters_simple %]
+
+[% END %]
+
+[% BLOCK patron_search_filters %]
+
+[% END %]
+
+[% BLOCK patron_search_table %]
+
+ [% IF filter == 'suggestions_managers' %]
+
Only staff with superlibrarian or suggestions_manage permissions are returned in the search results
+ [% ELSIF filter == 'orders_managers' %]
+
Only staff with superlibrarian or acquisitions permissions (or order_manage permission if granular permissions are enabled) are returned in the search results
Only staff with superlibrarian or acquisitions permissions (or budget_modify permission if granular permissions are enabled) are returned in the search results
+ [% END %]
+
+
+ Browse by last name:
+ [% SET alphabet = Koha.Preference('alphabet').split(' ') %]
+ [% UNLESS alphabet.size %]
+ [% alphabet = ['A' .. 'Z'] %]
+ [% END %]
+ [% FOREACH letter IN alphabet %]
+ [% letter | html %]
+ [% END %]
+
+
+
+
+
+
+
+
+
+ [% IF open_on_row_click %]
+
+ [% ELSE %]
+
+ [% END %]
+
+
+ [% FOR column IN columns %]
+ [% SWITCH column %]
+ [% CASE 'cardnumber' %]
Card
+ [% CASE 'dateofbirth' %]
Date of birth
+ [% CASE 'name' %]
Name
+ [% CASE 'name-address' %]
Name
+ [% CASE 'address' %]
Address
+ [% CASE 'address-library' %]
Address
+ [% CASE 'branch' %]
Library
+ [% CASE 'category' %]
Category
+ [% CASE 'dateexpiry' %]
Expires on
+ [% CASE 'borrowernotes' %]
Notes
+ [% CASE 'phone' %]
Phone
+ [% CASE 'action' %]
+ [% END %]
+ [% END %]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Loading
+
+
+
+
+
+
+
+[% END %]
+
+[% BLOCK patron_search_js %]
+
+ [% IF redirect_if_one_result && !redirect_url %]
+
+ [% END %]
+
+
+ [% INCLUDE 'datatables.inc' %]
+ [% INCLUDE 'js-date-format.inc' %]
+ [% INCLUDE 'js-patron-get-age.inc' %]
+ [% INCLUDE 'js-patron-format.inc' %]
+ [% INCLUDE 'js-patron-format-address.inc' %]
+
+
+[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/search.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/search.tt
@@ -1,5 +1,4 @@
[% USE raw %]
-[% USE To %]
[% USE Asset %]
[% USE Koha %]
[% USE Branches %]
@@ -8,398 +7,37 @@
[% INCLUDE 'doc-head-open.inc' %]
[% SET libraries = Branches.all %]
[% SET categories = Categories.all.unblessed %]
+[% PROCESS 'patron-search.inc' %]
Patron search › Koha
[% INCLUDE 'doc-head-close.inc' %]
-
+[%# FIXME This is not great, we should make members/memberentrygen.tt use a modal as well and we won't need that here %]
-
- [% IF filter == 'suggestions_managers' %]
-
Only staff with superlibrarian or suggestions_manage permissions are returned in the search results
- [% ELSIF filter == 'orders_managers' %]
-
Only staff with superlibrarian or acquisitions permissions (or order_manage permission if granular permissions are enabled) are returned in the search results
Only staff with superlibrarian or acquisitions permissions (or budget_modify permission if granular permissions are enabled) are returned in the search results
- [% END %]
-
-
- Browse by last name:
- [% FOREACH letter IN alphabet.split(' ') %]
- [% letter | html %]
- [% END %]
-