Lines 5-10
Link Here
|
5 |
[% USE Asset %] |
5 |
[% USE Asset %] |
6 |
[% USE To %] |
6 |
[% USE To %] |
7 |
|
7 |
|
|
|
8 |
[%# Display a simple form %] |
8 |
[% BLOCK patron_search_filters_simple %] |
9 |
[% BLOCK patron_search_filters_simple %] |
9 |
<form id="patron_search_form"> |
10 |
<form id="patron_search_form"> |
10 |
<div class="hint">Enter patron card number or partial name:</div> |
11 |
<div class="hint">Enter patron card number or partial name:</div> |
Lines 13-18
Link Here
|
13 |
</form> |
14 |
</form> |
14 |
[% END %] |
15 |
[% END %] |
15 |
|
16 |
|
|
|
17 |
[%# Display a complex patron search form %] |
18 |
[%# - Search: <input> %] |
19 |
[%# You can then pass a list of filters %] |
20 |
[%# - branch: <select library list> %] |
21 |
[%# - category: <select patron category list> %] |
22 |
[%# - search_field: <select patron field list> %] |
23 |
[%# - search_type: <select "contain" or "start with"> %] |
16 |
[% BLOCK patron_search_filters %] |
24 |
[% BLOCK patron_search_filters %] |
17 |
<form id="patron_search_form"> |
25 |
<form id="patron_search_form"> |
18 |
<fieldset class="brief"> |
26 |
<fieldset class="brief"> |
Lines 90-95
Link Here
|
90 |
</form> |
98 |
</form> |
91 |
[% END %] |
99 |
[% END %] |
92 |
|
100 |
|
|
|
101 |
[%# Display the table with: %] |
102 |
[%# - At the top a hint about a possible filter %] |
103 |
[%# - Browse by last name %] |
104 |
[%# - The table %] |
105 |
[%# Get the following parameters: %] |
106 |
[%# - filter: can be 'suggestions_managers', 'orders_managers', 'funds_owners' or 'funds_users' to filter patrons on their permissions %] |
107 |
[%# - table_id: the ID of the table %] |
108 |
[%# open_on_row_click: See patron_search_js %] |
109 |
[%# columns: See patron_search_js %] |
93 |
[% BLOCK patron_search_table %] |
110 |
[% BLOCK patron_search_table %] |
94 |
|
111 |
|
95 |
[% IF filter == 'suggestions_managers' %] |
112 |
[% IF filter == 'suggestions_managers' %] |
Lines 174-179
Link Here
|
174 |
|
191 |
|
175 |
[% END %] |
192 |
[% END %] |
176 |
|
193 |
|
|
|
194 |
[%# Integrate all the JS code, outside of a script tag %] |
195 |
[%# Get the following parameters: %] |
196 |
[%# - redirect_if_one_result: Redirect to the patron if the search returns only one result, note that it will not redirect if filters of the DT are used (this is a feature) %] |
197 |
[%# - redirect_url: The URL to use, the borrowernumber parameter will be added %] |
198 |
[%# filter: Same as patron_search_table %] |
199 |
[%# open_on_row_click: boolean, default off. Will allow to select a patron by clicking on the whole tr element %] |
200 |
[%# columns: list of columns that will be displayed. Possible values are: 'checkbox', 'cardnumber', 'dateofbirth', 'address', 'name', 'name-address', 'branch', 'category', 'dateexpiry', 'borrowernotes, 'phone', 'checkouts', 'account_balance', 'action' %] |
201 |
[%# preview_on_name_click: Open a modal window with patron's info when the name is clicked %] |
202 |
[%# actions: list of buttons to display in the action column. Possible values are: 'select', 'add', 'edit', 'checkout' %] |
203 |
[%# sticky_header and sticky_to: If we need a sticky header %] |
204 |
[%# callback: name of the JS function that will be called when a patron is selected. Only work with action=select %] |
177 |
[% BLOCK patron_search_js %] |
205 |
[% BLOCK patron_search_js %] |
178 |
|
206 |
|
179 |
[% IF redirect_if_one_result && !redirect_url %] |
207 |
[% IF redirect_if_one_result && !redirect_url %] |
180 |
- |
|
|