[% USE Koha %] [% USE Branches %] [% USE Categories %] [% USE raw %] [% PROCESS 'html_helpers.inc' %] [% PROCESS 'patronfields.inc' %]
Search fields: [% pref_fields = Koha.Preference('DefaultPatronSearchFields').split(',') %] [% default_fields = [ 'standard', 'surname', 'cardnumber', 'email', 'borrowernumber', 'userid', 'phone', 'address', 'dateofbirth', 'sort1', 'sort2' ] %] [% search_options = default_fields.merge(pref_fields).unique %] [% FOREACH s_o IN search_options %] [% display_name = PROCESS patron_fields name=s_o %] [% NEXT IF !display_name.length %] [% IF searchfieldstype == s_o %] [% display_name | $raw %] [% ELSE %] [% display_name | $raw %] [% END %] [% END %]
Search type: [% IF searchtype == 'start_with' %] Starts with Contains [% ELSE %] Starts with Contains [% END %]
Library: [% SET branches = Branches.all( selected => branchcode_filter, only_from_group => 1 ) %] [% IF branches.size != 1 %] Any [% END %] [% PROCESS options_for_libraries libraries => branches %]
Category: [% SET categories = Categories.all() %] Any [% FOREACH category IN categories %] [% IF category.categorycode == categorycode_filter %] [% category.description | html %] [% ELSE %] [% category.description | html %] [% END %] [% END %]