From 10585d2cb5d9e99d4c62d510065c26f222e04848 Mon Sep 17 00:00:00 2001
From: Solene Desvaux 
Date: Fri, 8 Jul 2022 13:45:24 +0200
Subject: [PATCH] Bug 30952: script searchbar
---
 .../prog/en/includes/acquisitions-search.inc  |  86 +--
 .../prog/en/includes/adv-search.inc           |  82 +--
 .../prog/en/includes/authorities-search.inc   |  90 +--
 .../prog/en/includes/budgets-admin-search.inc |  78 +--
 .../prog/en/includes/cat-search.inc           |  38 +-
 .../prog/en/includes/cataloging-search.inc    |  41 +-
 .../prog/en/includes/checkin-search.inc       |  83 +--
 .../prog/en/includes/circ-search.inc          |  75 +--
 .../prog/en/includes/cities-admin-search.inc  |  75 +--
 .../en/includes/contracts-admin-search.inc    |  75 +--
 .../en/includes/currencies-admin-search.inc   |  75 +--
 .../prog/en/includes/desks-admin-search.inc   |  75 +--
 .../prog/en/includes/home-search.inc          |  78 +--
 .../prog/en/includes/letters-search.inc       |  75 +--
 .../prog/en/includes/patron-search-header.inc |  88 +--
 .../prog/en/includes/patrons-admin-search.inc |  75 +--
 .../prog/en/includes/prefs-admin-search.inc   |  78 +--
 .../prog/en/includes/searchbaruse.inc         |  72 +++
 .../prog/en/includes/serials-search.inc       |  74 +--
 .../prog/en/includes/subscriptions-search.inc |  26 +-
 .../en/includes/suggestions-add-search.inc    |  75 +--
 .../prog/en/includes/z3950-admin-search.inc   |  75 +--
 .../prog/en/modules/admin/didyoumean.tt       | 106 ++--
 .../prog/en/modules/circ/circulation.tt       | 184 ++++--
 .../prog/en/modules/reserve/request.tt        | 598 +++++++++---------
 .../tools/batch_record_modification.tt        |  87 +--
 26 files changed, 661 insertions(+), 1903 deletions(-)
 create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/searchbaruse.inc
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc
index 58a74deda0..38b94ea751 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc
@@ -13,11 +13,11 @@
              
              
              
-             [-]  
-             [+]  
+             [-]  
+             [+]  
              
 
-            
+            
                  
                  
             
@@ -32,83 +32,7 @@
         Vendor search 
         Orders search 
     
-
+
 
-
-
-
-
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc
index 19401337b2..a3ce22f1a7 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc
@@ -40,85 +40,7 @@
         Renew 
         Search patrons 
     
-
-
-
-
-
-
-
-
 
+
+[% INCLUDE 'searchbaruse.inc' %]
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc
index 57cda07ccf..75ac30c94f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc
@@ -4,7 +4,7 @@
     
 
-
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc
index 3aad22ff79..f43fc88724 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc
@@ -8,7 +8,7 @@
     [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
     
         
-             
+             
              
          
      
@@ -25,85 +25,8 @@
         Renew 
         Search catalog 
     
-
+
 
-
-
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc
index e20271f8ab..959e68810a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc
@@ -36,78 +36,5 @@
     
 
 
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc
index 0f371302fa..58407ca786 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc
@@ -22,78 +22,5 @@
     
 
 
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc
index d3b8bf80b0..68b297d578 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc
@@ -23,78 +23,5 @@
 	
 
 
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc
index 3ec15b8d26..addbf32ae2 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc
@@ -23,78 +23,5 @@
     
 
 
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/desks-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/desks-admin-search.inc
index 07c4ebb701..6725936e01 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/desks-admin-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/desks-admin-search.inc
@@ -23,78 +23,5 @@
     
 
 
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc
index 79dc3cd26a..78f2fa9630 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc
@@ -46,83 +46,9 @@
         Search patrons 
         Search catalog 
     
-
+
 
-
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
 
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc
index 8e9dffa580..ee703341f6 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc
@@ -23,78 +23,5 @@
 		
 
 
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
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 a36f469db1..e590e1f092 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
@@ -17,7 +17,7 @@
                  
             
 
-            
+            
                 
                     Search fields: 
                 [% pref_fields = Koha.Preference('DefaultPatronSearchFields').split(',') %]
@@ -27,7 +27,7 @@
                     [% display_name = PROCESS patron_fields name=s_o %]
                     [% NEXT IF !display_name.length %]
                     [% IF searchfieldstype == s_o %]
-                        [% display_name | $raw %] 
+                        [% display_name | $raw %] 
                     [% ELSE %]
                         [% display_name | $raw %] 
                     [% END %]
@@ -35,12 +35,13 @@
                  
 
                 
+                    Search type: 
                 [% IF searchtype == 'start_with' %]
-                    Starts with 
+                    Starts with 
                     Contains 
                 [% ELSE %]
                     Starts with 
-                    Contains 
+                    Contains 
                 [% END %]
                  
 
@@ -97,86 +98,11 @@
         [% IF ( CAN_user_catalogue ) %]
 [% END %]
 
         Search patrons 
-        Check out 
+        Check out 
         Check in 
         Renew 
         Search catalog 
     
 
 
-
-
-
-
+[% INCLUDE 'searchbaruse.inc' %]
\ No newline at end of file
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc
index 8b891a0d1c..93fbf34363 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc
@@ -23,78 +23,5 @@
 		
 
 
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc
index d2d3a7c4fc..e94e11d8e0 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc
@@ -24,81 +24,7 @@
         Check out 
         Search the catalog 
     
-
+
 
-
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/searchbaruse.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/searchbaruse.inc
new file mode 100644
index 0000000000..5faf1f30e6
--- /dev/null
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/searchbaruse.inc
@@ -0,0 +1,72 @@
+
\ No newline at end of file
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc
index 7efbeeab0f..8f24f8a9e1 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc
@@ -33,77 +33,5 @@
     
 
 
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc
index 13e83a90a2..41d81f066f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc
@@ -1,39 +1,39 @@
 [% PROCESS 'html_helpers.inc' %]
 
     
-        
+          
 
-
-
+[% INCLUDE 'searchbaruse.inc' %]
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt
index 81c3e0d8bf..0d48c25b8b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/didyoumean.tt
@@ -1,47 +1,35 @@
 [% USE raw %]
 [% USE Asset %]
 [% SET footerjs = 1 %]
-[% formulaire = BLOCK %]
-    [% INCLUDE 'prefs-admin-search.inc' %]
-[% END %]
-
 [% BLOCK pluginlist %]
 
-    [% FOREACH plugin IN plugins %]
-        
-            
-                [% IF plugin.enabled %]
-                     
-                [% ELSE %]
-                     
-                [% END %]
-
-                [% plugin.name | html %] 
-            
-
-            
-                [% SWITCH plugin.name %]
-                    [% CASE 'AuthorityFile' %]
-                        Suggest authorities which are relevant to the term the user searched for. 
-                    [% CASE 'ExplodedTerms' %]
-                        Suggest that patrons expand their searches to include broader/narrower/related terms. 
-                    [% CASE 'LibrisSpellcheck' %]
-                        Use the LIBRIS spellcheck API. 
-                [% END %]
-            
+[% FOREACH plugin IN plugins %]
+    
+[% END %]
 
 [% END %]
-
 [% INCLUDE 'doc-head-open.inc' %]
 
Did you mean? › Administration › Koha 
 [% INCLUDE 'doc-head-close.inc' %]
-
 
 
 
-[% INCLUDE 'header.inc' form=formulaire %]
+[% INCLUDE 'header.inc' %]
+[% INCLUDE 'prefs-admin-search.inc' %]
 
 
     
@@ -57,14 +45,6 @@
             
         
      
-
-    
-        [% IF Koha.Preference('showLastPatron') %][% INCLUDE 'last-borrower.inc' %][% END %]
-     
-
-    
-          Help  
-     
  
 
 
@@ -72,34 +52,27 @@
         
             
 
-                Did you mean? 
-
-                
-                    
-                        Please enable Javascript: 
-                        Configuring 'Did you mean?' plugins requires Javascript. If
-                        you are unable to use Javascript, you may be able to enter the
-                        configuration (which is stored in JSON in the OPACdidyoumean system preferences)
-                        in the Local preferences tab in
-                        the system preference editor, but this is unsupported, not
-                        recommended, and likely will not work.
-                    
-                 
-
-                
-                    Please put the 'Did you mean?' plugins in order by significance, from
-                    most significant to least significant, and check the box to enable those
-                    plugins that you want to use.
-                
+        Did you mean? 
+        Please enable Javascript: 
+            Configuring 'Did you mean?' plugins requires Javascript. If
+            you are unable to use Javascript, you may be able to enter the
+            configuration (which is stored in JSON in the OPACdidyoumean system preferences)
+            in the Local preferences tab in
+            the system preference editor, but this is unsupported, not
+            recommended, and likely will not work.
 
+        
+            Please put the 'Did you mean?' plugins in order by significance, from
+            most significant to least significant, and check the box to enable those
+            plugins that you want to use.
+        
+        
+            
+                OPAC 
+                [% PROCESS pluginlist plugins=OPACpluginlist type='opac' %]
+             
+            Save configuration  Cancel  
+         
 
-                
-                    
-                        OPAC 
-                        [% PROCESS pluginlist plugins=OPACpluginlist type='opac' %]
-                        Save configuration 
-                        Cancel 
-                     
-                 
              
           
 
@@ -108,7 +81,7 @@
                 [% INCLUDE 'admin-menu.inc' %]
             
         
 
-    
  
+      
 
 [% MACRO jsinclude BLOCK %]
     [% Asset.js("js/admin-menu.js") | $raw %]
@@ -158,5 +131,4 @@
         }
     
 [% END %]
-
 [% INCLUDE 'intranet-bottom.inc' %]
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 ccb9bb3834..f433448406 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
@@ -10,9 +10,6 @@
 [% USE Price %]
 [% USE AuthorisedValues %]
 [% SET footerjs = 1 %]
-[% formulaire = BLOCK %]
-    [% INCLUDE 'circ-search.inc' %]
-[% END %]
 [% INCLUDE 'doc-head-open.inc' %]
 [% Asset.css("lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css") | $raw %]
 [% SET destination = "circ" %]
@@ -27,7 +24,8 @@
 
 
 
-    [% INCLUDE 'header.inc' form=formulaire %]
+    [% INCLUDE 'header.inc' %]
+    [% INCLUDE 'circ-search.inc' %]
 
     
         
@@ -66,6 +64,8 @@
                         [% INCLUDE 'members-toolbar.inc' %]
                     [% END %]
 
+                    Checkouts 
+
                     
                     [% IF ( was_renewed ) %]
                         Patron's account has been renewed until [% expiry | $KohaDates %]
@@ -235,6 +235,15 @@
                                         Please confirm that the accompanying materials are present: [% ADDITIONAL_MATERIALS | html %]
                                     
                                 [% END %]
+
+                                [% IF RECALLED %]
+                                    [% IF RECALLED.waiting %]
+                                        Item [% RECALLED.biblio.title | html %]  ([% RECALLED.item.barcode | html %]) has been waiting for [% RECALLED.patron.firstname | html %] [% RECALLED.patron.surname | html %]  ([% RECALLED.patron.cardnumber | html %]) at [% Branches.GetName( RECALLED.pickup_library_id ) | html %] since [% RECALLED.waiting_date | $KohaDates %] 
+                                    [% ELSIF RECALLED.requested or RECALLED.overdue %]
+                                        Item [% RECALLED.biblio.title | html %]  [% IF RECALLED.item %]([% RECALLED.item.barcode | html %])[% END %] has been recalled by [% RECALLED.patron.firstname | html %] [% RECALLED.patron.surname | html %]  ([% RECALLED.patron.cardnumber | html %]) at [% Branches.GetName( RECALLED.pickup_library_id ) | html %] since [% RECALLED.created_date | $KohaDates %] 
+                                    [% END %]
+                                [% END %]
+
                             
 
                             [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
@@ -284,6 +293,21 @@
                                           
                                     [% END %]
 
+                                    [% IF ( RECALLED ) %]
+                                        
+                                            Cancel recall 
+                                             
+                                             
+                                        
+                                        [% IF RECALLED.waiting %]
+                                            
+                                                Revert waiting status 
+                                                 
+                                                 
+                                            
+                                        [% END %]
+                                    [% END %]
+
                                      
                                      
                                      
@@ -348,6 +372,12 @@
                                 
                             [% END %]
 
+                            [% IF ( RECALLED ) %]
+                                
+                                      Don't check out and print slip (P) 
+                                 
+                            [% END %]
+
                             
                                 [% IF (forceallow) %] [% END %]
                                  
@@ -365,9 +395,9 @@
                                 [% END %]
                              
 
-                            [% IF ( RESERVED || ISSUED_TO_ANOTHER ) && (CAN_user_reserveforothers_place_holds ) %]
+                            [% IF ( RESERVED || ISSUED_TO_ANOTHER || RECALLED ) && (CAN_user_reserveforothers_place_holds ) %]
                                 [% UNLESS noissues %]
-                                      Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %] 
+                                      Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %] 
                                 [% END %]
                             [% END %]
                          
@@ -406,7 +436,7 @@
 
                                             [% IF ( fast_cataloging ) %]
                                                 [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
-                                                      Add record using fast cataloging 
+                                                      Add record using fast cataloging 
                                                 [% END %]
                                             [% END %]
                                         
@@ -487,6 +517,10 @@
                                 [% IF ( USERBLOCKEDOVERDUE ) %]
                                     Checkouts are BLOCKED because patron has overdue items. 
                                 [% END %]
+
+                                [% IF ( RECALLED_INTRANSIT ) %]
+                                    Item has been recalled and is in transit for pickup at [% Branches.GetName( RECALLED_INTRANSIT ) | html %]. 
+                                [% END %]
                                 
 
                                 [% IF (forceallow) %]
@@ -554,7 +588,7 @@
                                                                      
                                                                      
                                                                      
-                                                                      Check out 
+                                                                      Check out 
                                                                 
                                                             
                                                         
@@ -563,7 +597,7 @@
                                                 
                                              
                                             
                                          
                                      
@@ -603,7 +637,6 @@
                                 
                                     
                                          
-                                        
                                         [% IF ( issue ) %]
                                             
                                         [% ELSE %]
@@ -620,7 +653,7 @@
 
                                         [% IF (forceallow) %] [% END %]
 
-                                        Checking out to [% INCLUDE 'patron-title.inc' %] 
+                                        Checking out to [% INCLUDE 'patron-title.inc' %] 
 
                                         [% IF Koha.Preference('itemBarcodeFallbackSearch') %]
                                             Enter item barcode or keyword:
@@ -634,12 +667,12 @@
                                              
                                         [% END %]
 
+                                        Check out 
+
                                         
 
-                                        Check out 
-
                                         
 
                                                 [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
@@ -662,31 +695,33 @@
                                                 [% END %]
 
                                                 [% UNLESS ( noissues ) %]
-                                                    
+                                                    [% END %]
                                                     [% IF Koha.Preference('decreaseLoanHighHolds') %]
                                                         
                                                             [% IF NEEDSCONFIRMATION %]
@@ -734,7 +769,6 @@
                                                      
                                             [% END %]
                                          
-                                        
 
                                         [% IF ( issue ) %]
                                             
@@ -756,7 +790,6 @@
                                 
                             [% END %]
 
-                            
                             [% IF ( noissues ) %]
                                 [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
                                     
@@ -773,40 +806,39 @@
                             [% ELSE %]
                                 
                             [% END %]
-                            
 
                             [% INCLUDE 'patron_messages.inc' %]
 
-                        
+                        
  
                       
                   
 
                 
                     
                         
-                            [% IF ( issuecount ) %]
-                                [% issuecount | html %] Checkout(s) 
-                            [% ELSE %]
-                                0 Checkouts 
-                            [% END %]
+                            Checkouts ([% issuecount || 0 | html %]) 
                          
 
                         [% IF relatives_issues_count %]
-                            [% relatives_issues_count | html %] Relatives' checkouts  
+                            
+                                Relatives' checkouts ([% relatives_issues_count | html %]) 
+                             
                         [% END %]
 
                         
-                            [% IF ( holds_count ) %]
-                                [% holds_count | html %] Hold(s) 
-                            [% ELSE %]
-                                0 Holds 
-                            [% END %]
+                            Holds ([% holds_count || 0 | html %]) 
                          
 
+                        [% IF Koha.Preference('UseRecalls') %]
+                            
+                                Recalls ([% recalls.count || 0 | html %]) 
+                             
+                        [% END %]
+
                         [% IF Koha.Preference('ArticleRequests') %]
                             [% SET current_article_requests = Context.Scalar( Context.Scalar( patron, 'article_requests' ), 'filter_by_current' ) %]
                             
-                                 [% current_article_requests.count | html %] Article requests 
+                                Article requests ([% current_article_requests.count || 0 | html %]) 
                              
                         [% END %]
 
@@ -814,8 +846,8 @@
                             
                                 [% IF ( patron.return_claims.count ) %]
                                     
-                                        Claim(s)
-                                        [% IF patron.return_claims.resolved.count == 0 %]
+                                        Claims
+                                        ([% IF patron.return_claims.resolved.count == 0 %]
                                             [% patron.return_claims.resolved.count | html %] 
                                         [% ELSE %]
                                             [% patron.return_claims.resolved.count | html %] 
@@ -824,22 +856,24 @@
                                             [% patron.return_claims.unresolved.count | html %] 
                                         [% ELSE %]
                                             [% patron.return_claims.unresolved.count | html %] 
-                                        [% END %]
+                                        [% END %])
                                      
                                 [% ELSE %]
                                     
-                                        Claim(s)
-                                        0 
-                                        0 
+                                        Claims
+                                        (0 
+                                        0 )
                                      
                                 [% END %]
                              
                         [% END %]
 
-                        [% debarments.count | html %] Restrictions  
+                        
+                            Restrictions ([% debarments.count || 0 | html %]) 
+                         
 
-                        [% SET enrollments = patron.get_club_enrollments(1) %]
-                        [% SET enrollable  = patron.get_enrollable_clubs(0,1) %]
+                        [% SET enrollments = patron.get_club_enrollments %]
+                        [% SET enrollable  = patron.get_enrollable_clubs(0) %] 
                         [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
                             
                                 
@@ -873,6 +907,7 @@
                                              Hold date 
                                             Title 
                                             Call number 
+                                            Item type 
                                             Barcode 
                                             Pickup at 
                                             Expiration 
@@ -888,7 +923,7 @@
                                      
 
                                     [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
-                                    [% IF hold_cancellation %]
+                                    [% IF hold_cancellation.count %]
                                         
                                             No reason given 
                                             [% FOREACH reason IN hold_cancellation %]
@@ -904,7 +939,7 @@
                                     
                                          
                                          
-                                         
+                                         
 
                                         [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
                                         until 
@@ -919,7 +954,7 @@
                                          
                                          
                                          
-                                         
+                                         
                                      
                                 
                             [% END # /IF SuspendHoldsIntranet %]
@@ -929,6 +964,12 @@
                         [% END # /IF holds_count %]
                          
 
+                    [% IF Koha.Preference('UseRecalls') %]
+                        
+                            [% INCLUDE 'recalls.inc' %]
+                        
+                    [% END %]
+
                     [% IF Koha.Preference('ClaimReturnedLostValue') %]
                         [% INCLUDE 'patron-return-claims.inc' %]
                     [% END %]
@@ -939,7 +980,7 @@
 
                 
  
                 [% ELSIF borrowernumber # IF patron %]
-                    
+                    
                 [% END # /IF patron %]
 
                    
@@ -965,6 +1006,10 @@
                
         
 
+        [% IF Koha.Preference('ClaimReturnedLostValue') %]
+            [% INCLUDE 'modals/resolve_return_claim.inc' %]
+        [% END %]
+
 
 
     
@@ -980,11 +1025,8 @@
 
 
 
 [% MACRO jsinclude BLOCK %]
-    [% INCLUDE 'calendar.inc' %]
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'columns_settings.inc' %]
-    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
-    [% INCLUDE 'timepicker.inc' %]
     [% INCLUDE 'select2.inc' %]
     [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %]
     [% INCLUDE 'js-date-format.inc' %]
@@ -1012,10 +1054,14 @@
     
     [% Asset.js("js/pages/circulation.js") | $raw %]
     [% Asset.js("js/checkouts.js") | $raw %]
+    [% IF Koha.Preference('ClaimReturnedLostValue') %]
+        [% Asset.js("js/resolve_claim_modal.js") | $raw %]
+    [% END %]
     [% Asset.js("js/holds.js") | $raw %]
+    [% INCLUDE 'calendar.inc' %]
     
     [% INCLUDE 'str/members-menu.inc' %]
     [% Asset.js("js/members-menu.js") | $raw %]
+    [% Asset.js("js/recalls.js") | $raw %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
-
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
index 599dd8364d..275fe90e53 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
@@ -13,10 +13,11 @@
 [% USE TablesSettings %]
 [% PROCESS 'i18n.inc' %]
 [% SET footerjs = 1 %]
-[% formulaire = BLOCK %]
-    [% INCLUDE 'circ-search.inc' %]
-[% END %]
 [% INCLUDE 'doc-head-open.inc' %]
+[% SET libraries = Branches.all %]
+[% SET categories = Categories.all.unblessed %]
+[% SET columns = ['name', 'cardnumber', 'dateofbirth', 'category', 'branch', 'address', 'phone'] %]
+[% PROCESS "patron-search.inc" %]
 [% UNLESS ( multi_hold ) %]
     
Place a hold on [% INCLUDE 'biblio-title-head.inc' %] › Holds › Circulation › Koha 
 [% ELSE %]
@@ -92,7 +93,8 @@
 
 
 
-[% INCLUDE 'header.inc' form=formulaire %]
+[% INCLUDE 'header.inc' %]
+[% INCLUDE 'circ-search.inc' %]
 
 [% UNLESS ( multi_hold ) %]
     
@@ -112,12 +114,6 @@
                 
             
         
-        
-            [% IF Koha.Preference('showLastPatron') %][% INCLUDE 'last-borrower.inc' %][% END %]
-         
-        
-              Help  
-         
      
 [% ELSE %]
     
@@ -158,6 +154,7 @@
         [% END %]
 
         
+            Holds 
 
             [% IF ( nobiblio ) %]
                 
@@ -190,7 +187,7 @@
             [% END %]
 
             [% UNLESS ( multi_hold ) %]
-                
Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] 
+                
Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %] by [% biblio.author | html %][% END %] 
             [% ELSE %]
                 
                     [% IF ( patron ) %]
@@ -219,35 +216,33 @@
                          No club with this name, please, try another
                      
                 [% END %]
-                
+                
                     [% UNLESS multi_hold %]
                         [% IF clubcount %]
-                            Search patrons or clubs 
+                            Search patrons or clubs 
                         [% ELSE %]
-                            Search patrons 
+                            Search patrons 
                         [% END %]
                     [% END %]