[% USE raw %]
[% USE Asset %]
[% USE Koha %]
[% USE KohaDates %]
[% USE Branches %]
[% USE Categories %]
[% USE AuthorisedValues %]
[% USE ItemTypes %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% 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" %]
Existing recalls
[% IF Koha.Preference('UseRecalls') != "off" %]
[% IF recalls.count %]
[% ELSE %]
No recalls have been made.
[% END %]
[% ELSE %]
Recalls have not been enabled. Enable the
UseRecalls system preference to use recalls.
[% END %]
[% END # patron %]
[% END # WRAPPER %]
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/recalls.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'select2.inc' %]
[% SET url_biblio_params = "biblionumber=" _ biblio.biblionumber %]
[% UNLESS patron %]
[% SET search_results_block_id = 'recalls_patronsearch_pane_panel' %]
[%# adjusting variable for patron-search.inc %]
[% PROCESS patron_search_js table_id => 'table_borrowers', categories => categories, libraries => libraries, columns => columns, open_on_row_click => 1, on_click_url => '/cgi-bin/koha/recalls/request.pl?' _ url_biblio_params, redirect_if_one_result => 1, redirect_url => '/cgi-bin/koha/recalls/request.pl?' _ url_biblio_params, redirect_if_attribute_equal => 'cardnumber' %]
[% END %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]