| Lines 105-110
          
      
      
        Link Here | 
        
          | 105 |                             [% CASE 'dateexpiry' %]<th>Expires on</td> | 105 |                             [% CASE 'dateexpiry' %]<th>Expires on</td> | 
        
          | 106 |                             [% CASE 'borrowernotes' %]<th>Notes</th> | 106 |                             [% CASE 'borrowernotes' %]<th>Notes</th> | 
        
          | 107 |                             [% CASE 'phone' %]<th>Phone</th> | 107 |                             [% CASE 'phone' %]<th>Phone</th> | 
            
              |  |  | 108 |                             [% CASE 'checkouts' %]<th>Checkouts</th> | 
        
          | 108 |                             [% CASE 'action' %]<th> </th> | 109 |                             [% CASE 'action' %]<th> </th> | 
        
          | 109 |                         [% END %] | 110 |                         [% END %] | 
        
          | 110 |                     [% END %] | 111 |                     [% END %] | 
  
    | Lines 153-160
          
      
      
        Link Here | 
        
          | 153 |             return map; | 154 |             return map; | 
        
          | 154 |         }, {}); | 155 |         }, {}); | 
        
          | 155 |  | 156 |  | 
          
            
              | 156 |         [% IF Koha.Preference('ExtendedPatronAttributes') %] | 157 |         [% IF Koha.Preference('ExtendedPatronAttributes') && extended_attribute_types %] | 
            
              | 157 |             let extended_attribute_types = [% To.json(attribute_type_codes || []) | $raw %]; | 158 |             let extended_attribute_types = [% To.json(extended_attribute_types || []) | $raw %]; | 
        
          | 158 |         [% END %] | 159 |         [% END %] | 
        
          | 159 |  | 160 |  | 
        
          | 160 |     </script> | 161 |     </script> | 
  
    | Lines 189-195
          
      
      
        Link Here | 
        
          | 189 |                         [% FOR search_field IN search_fields.split(',') %] | 190 |                         [% FOR search_field IN search_fields.split(',') %] | 
        
          | 190 |                         {"me.[% search_field | html %]":{"like":"%"+filter+"%"}}, | 191 |                         {"me.[% search_field | html %]":{"like":"%"+filter+"%"}}, | 
        
          | 191 |                         [% END %] | 192 |                         [% END %] | 
          
            
              | 192 |                         [% IF Koha.Preference('ExtendedPatronAttributes') %] | 193 |                         [% IF Koha.Preference('ExtendedPatronAttributes') && extended_attribute_types %] | 
        
          | 193 |                         { | 194 |                         { | 
        
          | 194 |                             "extended_attributes.value": { "like": "%" + filter + "%" }, | 195 |                             "extended_attributes.value": { "like": "%" + filter + "%" }, | 
        
          | 195 |                             "extended_attributes.code": extended_attribute_types | 196 |                             "extended_attributes.code": extended_attribute_types | 
  
    | Lines 202-207
          
      
      
        Link Here | 
        
          | 202 |                 [% default_sort_column = "name" %] | 203 |                 [% default_sort_column = "name" %] | 
        
          | 203 |             [% END %] | 204 |             [% END %] | 
        
          | 204 |             [% SET order_column_index = 0 %] | 205 |             [% SET order_column_index = 0 %] | 
            
              |  |  | 206 |             [% SET embed = ['extended_attributes'] %] | 
        
          | 205 |             patrons_table = $("#[% table_id | html %]").kohaTable({ | 207 |             patrons_table = $("#[% table_id | html %]").kohaTable({ | 
        
          | 206 |                 "ajax": { | 208 |                 "ajax": { | 
        
          | 207 |                     [% SWITCH filter %] | 209 |                     [% SWITCH filter %] | 
  
    | Lines 228-234
          
      
      
        Link Here | 
        
          | 228 |                         return json.data; | 230 |                         return json.data; | 
        
          | 229 |                     } | 231 |                     } | 
        
          | 230 |                 }, | 232 |                 }, | 
            
              | 231 |                 embed: ['extended_attributes'], |  |  | 
        
          | 232 |                 "drawCallback": function( settings ) { | 233 |                 "drawCallback": function( settings ) { | 
        
          | 233 |                     var api = this.api(); | 234 |                     var api = this.api(); | 
        
          | 234 |                     var data = api.data(); | 235 |                     var data = api.data(); | 
  
    | Lines 255-260
          
      
      
        Link Here | 
        
          | 255 |                             [% order_column_index = loop.count - 1%] | 256 |                             [% order_column_index = loop.count - 1%] | 
        
          | 256 |                         [% END %] | 257 |                         [% END %] | 
        
          | 257 |                         [% SWITCH column %] | 258 |                         [% SWITCH column %] | 
            
              |  |  | 259 |                             [% CASE 'checkbox' %] | 
            
              | 260 |                             { | 
            
              | 261 |                                 "data": "borrowernumber", | 
            
              | 262 |                                 "searchable": true, | 
            
              | 263 |                                 "orderable": true, | 
            
              | 264 |                                 "render": function( data, type, row, meta ) { | 
            
              | 265 |                                     return "<input type=\"checkbox\" name="data ? escape_str($date(data) + " (" + _("%s years").format($get_age(data)) + ")") : ""; | 
            
              | 266 |  | 
            
              | 267 |                                     return "<label for='check" + data + "' class='content_hidden'>" + _("Select patron") + "</label><input type='checkbox' id='check" + data + "' class='selection' name='borrowernumber' value='" + data + "' />", | 
            
              | 268 |                                 } | 
            
              | 269 |                             } | 
        
          | 258 |                             [% CASE 'cardnumber' %] | 270 |                             [% CASE 'cardnumber' %] | 
        
          | 259 |                             { | 271 |                             { | 
        
          | 260 |                                 "data": "cardnumber", | 272 |                                 "data": "cardnumber", | 
  
    | Lines 373-378
          
      
      
        Link Here | 
        
          | 373 |                                     return escape_str(data); | 385 |                                     return escape_str(data); | 
        
          | 374 |                                 } | 386 |                                 } | 
        
          | 375 |                             } | 387 |                             } | 
            
              |  |  | 388 |                             [% CASE 'checkouts' %][% embed.push('checkouts+count') %] | 
            
              | 389 |                             { | 
            
              | 390 |                                 "data": "", | 
            
              | 391 |                                 "searchable": false, | 
            
              | 392 |                                 "orderable": false, | 
            
              | 393 |                                 "render": function( data, type, row, meta ) { | 
            
              | 394 |                                     return escape_str(row.checkouts_count); | 
            
              | 395 |                                 } | 
            
              | 396 |                             } | 
        
          | 376 |                             [% CASE 'action' %] | 397 |                             [% CASE 'action' %] | 
        
          | 377 |                             { | 398 |                             { | 
        
          | 378 |                                 "data": function( row, type, val, meta ) { | 399 |                                 "data": function( row, type, val, meta ) { | 
  
    | Lines 391-396
          
      
      
        Link Here | 
        
          | 391 |                         [% UNLESS loop.last %],[% END %] | 412 |                         [% UNLESS loop.last %],[% END %] | 
        
          | 392 |                     [% END %] | 413 |                     [% END %] | 
        
          | 393 |                 ], | 414 |                 ], | 
            
              |  |  | 415 |                 'embed': [% To.json(embed) | $raw %], | 
        
          | 394 |                 "order": [[ [% order_column_index | html %], "asc" ]], | 416 |                 "order": [[ [% order_column_index | html %], "asc" ]], | 
        
          | 395 |                 'bAutoWidth': false, | 417 |                 'bAutoWidth': false, | 
        
          | 396 |                 'sPaginationType': 'full_numbers', | 418 |                 'sPaginationType': 'full_numbers', |