Lines 2-12
Link Here
|
2 |
[% USE Asset %] |
2 |
[% USE Asset %] |
3 |
[% USE Koha %] |
3 |
[% USE Koha %] |
4 |
[% USE KohaDates %] |
4 |
[% USE KohaDates %] |
|
|
5 |
[% USE TablesSettings %] |
6 |
[% USE Branches %] |
7 |
[% USE Categories %] |
8 |
[% USE AuthorisedValues %] |
9 |
[% USE ItemTypes %] |
10 |
[% SET libraries = Branches.all %] |
11 |
[% SET categories = Categories.all.unblessed %] |
12 |
[% SET columns = ['name', 'cardnumber', 'dateofbirth', 'category', 'branch', 'address', 'phone'] %] |
13 |
[% PROCESS "patron-search.inc" %] |
5 |
[% PROCESS 'i18n.inc' %] |
14 |
[% PROCESS 'i18n.inc' %] |
6 |
[% SET footerjs = 1 %] |
15 |
[% SET footerjs = 1 %] |
7 |
[% INCLUDE 'doc-head-open.inc' %] |
16 |
[% INCLUDE 'doc-head-open.inc' %] |
8 |
<title>[% FILTER collapse %] |
17 |
<title>[% FILTER collapse %] |
9 |
[% t("Existing recalls") | html %] › |
18 |
[% t("Place a recall") | html %] › |
10 |
[% t("Recalls") | html %] › |
19 |
[% t("Recalls") | html %] › |
11 |
[% t("Koha") | html %] |
20 |
[% t("Koha") | html %] |
12 |
[% END %]</title> |
21 |
[% END %]</title> |
Lines 26-32
Link Here
|
26 |
[% INCLUDE 'biblio-title.inc' link = 1 %] |
35 |
[% INCLUDE 'biblio-title.inc' link = 1 %] |
27 |
[% END %] |
36 |
[% END %] |
28 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
37 |
[% WRAPPER breadcrumb_item bc_active= 1 %] |
29 |
<span>Existing recalls</span> |
38 |
<span>Place a recall</span> |
30 |
[% END %] |
39 |
[% END %] |
31 |
[% END #/ WRAPPER breadcrumbs %] |
40 |
[% END #/ WRAPPER breadcrumbs %] |
32 |
[% END #/ WRAPPER sub-header.inc %] |
41 |
[% END #/ WRAPPER sub-header.inc %] |
Lines 37-63
Link Here
|
37 |
<main> |
46 |
<main> |
38 |
[% INCLUDE 'messages.inc' %] |
47 |
[% INCLUDE 'messages.inc' %] |
39 |
|
48 |
|
40 |
<h1>Existing recalls</h1> |
49 |
<h1>Recalls</h1> |
41 |
|
50 |
|
42 |
[% IF Koha.Preference('UseRecalls') %] |
51 |
<h2>Place a recall on [% INCLUDE 'biblio-title.inc' link = 1 %]</h2> |
43 |
[% IF recalls.count %] |
52 |
|
44 |
<div class="page-section"> |
53 |
[% IF patron %] |
45 |
<form method="post" action="/cgi-bin/koha/recalls/request.pl"> |
54 |
|
|
|
55 |
[% IF error %] |
56 |
<div class="dialog alert"> |
57 |
Unable to place a recall. Check your circulation rules. |
58 |
</div> |
59 |
[% END %] |
60 |
|
61 |
<fieldset class="rows"> |
62 |
<legend>Recall details</legend> |
63 |
<form id="recallform" action="/cgi-bin/koha/recalls/request.pl" method="post"> |
64 |
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]"> |
65 |
|
66 |
<ol> |
67 |
<li> |
68 |
<label for="borrowernumber">Patron:</label> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% INCLUDE 'patron-title.inc' %]</a> |
69 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"> |
70 |
</li> |
71 |
|
72 |
[% UNLESS ( single_branch_mode ) %]<li> |
73 |
<label for="pickup">Pick up at:</label> |
74 |
<select name="pickup" id="pickup"> |
75 |
[% FOREACH branch IN branches %] |
76 |
[% IF branch.branchcode == patron.branchcode %] |
77 |
<option value="[% branch.branchcode | html %]" selected>[% Branches.GetName( branch.branchcode ) | html %]</option> |
78 |
[% ELSE %] |
79 |
<option value="[% branch.branchcode | html %]">[% Branches.GetName( branch.branchcode ) | html %]</option> |
80 |
[% END %] |
81 |
[% END %] |
82 |
</select> |
83 |
</li>[% END %] |
84 |
|
85 |
<li> |
86 |
<label for="expirationdate">Recall not needed after:</label> <input type="text" name="expirationdate" id="expirationdate" size="20" class="flatpickr"> |
87 |
</li> |
88 |
<li> |
89 |
<label for="type">Recall next available item</label> <input type="checkbox" name="type" id="type" checked> |
90 |
</li> |
91 |
</ol> |
92 |
|
93 |
<fieldset class="action"> |
94 |
[% INCLUDE 'csrf-token.inc' %] |
95 |
<input type="hidden" name="op" value="cud-request"> |
96 |
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]"> |
97 |
[% IF error %] |
98 |
<input type="submit" class="btn btn-default" value="Place recall" disabled="disabled"> |
99 |
[% ELSE %] |
100 |
<input type="submit" class="btn btn-default" value="Place recall"> |
101 |
[% END %] |
102 |
<a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% biblio.biblionumber | uri %]" class="cancel">Cancel</a> |
103 |
</fieldset> |
104 |
|
105 |
<table id="items"> |
106 |
<caption>Place a recall on a specific item</caption> |
107 |
<thead> |
108 |
<tr> |
109 |
<th> </th> |
110 |
<th>Item type</th> |
111 |
<th>Barcode</th> |
112 |
[% UNLESS ( single_branch_mode ) %] |
113 |
<th>Home library</th> |
114 |
<th>Last location</th> |
115 |
[% END %] |
116 |
<th>Collection</th> |
117 |
<th>Call number</th> |
118 |
<th>Copy number</th> |
119 |
<th>Vol no.</th> |
120 |
<th>Information</th> |
121 |
</tr> |
122 |
</thead> |
123 |
<tbody> |
124 |
[% FOREACH item IN items %]<tr> |
125 |
<td> |
126 |
[% IF item.can_be_recalled( patron => patron ) %] |
127 |
<input type="radio" class="itemnumber" name="itemnumber" value="[% item.itemnumber | html %]"> |
128 |
[% ELSE %] |
129 |
<span class="error"> |
130 |
<i class="fa fa-times fa-lg" title="Cannot be recalled"></i> |
131 |
</span> |
132 |
[% END %] |
133 |
</td> |
134 |
<td>[% ItemTypes.GetDescription( item.effective_itemtype ) | html %]</td> |
135 |
<td>[% item.barcode | html %]</td> |
136 |
[% UNLESS ( single_branch_mode ) %] |
137 |
<td>[% Branches.GetName( item.homebranch ) | html %]</td> |
138 |
<td>[% Branches.GetName( item.holdingbranch) | html %]</td> |
139 |
[% END %] |
140 |
<td>[% AuthorisedValues.GetByCode( 'CCODE', item.ccode, 1 ) | html %]</td> |
141 |
<td>[% item.itemcallnumber | html %]</td> |
142 |
<td>[% item.copynumber | html %]</td> |
143 |
<td>[% item.enumchron | html %]</td> |
144 |
<td> |
145 |
[% IF ( item.checkout ) %] |
146 |
<span class="checkedout">Due [% item.checkout.date_due | $KohaDates %]</span> |
147 |
[% ELSIF ( item.get_transfer ) %] |
148 |
<span class="intransit">In transit from [% Branches.GetName( item.get_transfer.frombranch ) | html %] to [% Branches.GetName( item.get_transfer.tobranch ) | html %] since [% item.get_transfer.datesent | $KohaDates %]</span> |
149 |
[% END %] |
150 |
[% IF ( item.itemlost || item.withdrawn ) %] |
151 |
<span class="lost">Unavailable (lost or missing)</span> |
152 |
[% END %] |
153 |
[% IF ( item.notforloan ) %] |
154 |
<span class="notforloan">Not for loan ([% item.notforloan | html %])</span> |
155 |
[% END %] |
156 |
[% hold = item.current_holds.next %] |
157 |
[% IF ( item.recall ) %] |
158 |
<span class="waiting"> |
159 |
[% IF ( item.recall.waiting_date ) %] |
160 |
Waiting for patron at [% Branches.GetName( item.recall.pickup_library_id ) | html %] since [% item.recall.waiting_date | $KohaDates %]. |
161 |
[% ELSIF ( item.recall.item_id == item.itemnumber ) %] |
162 |
Recalled by patron expected at [% Branches.GetName( item.recall.pickup_library_id ) | html %] since [% item.recall.created_date | $KohaDates %]. |
163 |
[% END %] |
164 |
</span> |
165 |
[% ELSIF ( hold.waitingdate ) %] |
166 |
<span class="waiting"> |
167 |
Waiting for patron at [% Branches.GetName( hold.branchcode ) | html %] since [% hold.waitingdate | $KohaDates %]. |
168 |
</span> |
169 |
[% ELSIF ( hold.borrowernumber == logged_in_user.borrowernumber ) %] |
170 |
<span class="waiting"> |
171 |
Patron has already placed a <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% patron.borrowernumber | uri %]#reserves">reserve</a> on this item. |
172 |
</span> |
173 |
[% END # / IF ( item.recall or hold ) %] |
174 |
</td> |
175 |
</tr>[% END %] |
176 |
</tbody> |
177 |
</table> |
178 |
|
179 |
<fieldset class="action"> |
46 |
[% INCLUDE 'csrf-token.inc' %] |
180 |
[% INCLUDE 'csrf-token.inc' %] |
47 |
<input type="hidden" name="op" value="cud-cancel_multiple_recalls"> |
181 |
<input type="hidden" name="op" value="cud-request"> |
48 |
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]"> |
182 |
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]"> |
49 |
<input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span> |
183 |
[% IF error %] |
50 |
[% INCLUDE 'recalls.inc' %] |
184 |
<input type="submit" class="btn btn-default" value="Place recall" disabled="disabled"> |
51 |
<fieldset class="action"> |
185 |
[% ELSE %] |
52 |
<button type="submit" id="cancel_selected" class="btn btn-default btn-sm">Cancel selected recalls</button> |
186 |
<input type="submit" class="btn btn-default" value="Place recall"> |
53 |
</fieldset> |
187 |
[% END %] |
54 |
</form> |
188 |
<a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% biblio.biblionumber | uri %]" class="cancel">Cancel</a> |
55 |
</div> <!-- /.page-section --> |
189 |
</fieldset> |
|
|
190 |
</form> |
191 |
|
192 |
</fieldset> |
193 |
|
194 |
[% ELSE %] |
195 |
|
196 |
[% IF Koha.Preference('RecallsInterface') == 'opac' %] |
197 |
<div class="dialog alert"> |
198 |
Due to the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RecallsInterface">RecallsInterface system preference</a>, recalls cannot be placed through the staff client. |
199 |
</div> |
56 |
[% ELSE %] |
200 |
[% ELSE %] |
57 |
<div class="alert alert-info">No recalls have been made.</div> |
201 |
|
|
|
202 |
<fieldset> |
203 |
<h2>Search patrons</h2> |
204 |
<div id="circ_recalls_select" class="toptabs"> |
205 |
<ul class="nav nav-tabs" role="tablist"> |
206 |
<li role="presentation" class="active"><a href="#recalls_patronsearch_pane" aria-controls="recalls_patronsearch_pane" role="tab" data-toggle="tab">Patrons</a></li> |
207 |
</ul> |
208 |
<div class="tab-content"> |
209 |
<div id="recalls_patronsearch_pane" role="tabpanel" class="tab-pane active"> |
210 |
[% PROCESS patron_search_filters_simple %] |
211 |
[% PROCESS patron_search_table table_id => 'table_borrowers', open_on_row_click => 1 %] |
212 |
</div> |
213 |
</div> <!-- /.tab-content --> |
214 |
</div> |
215 |
</fieldset> |
216 |
|
58 |
[% END %] |
217 |
[% END %] |
59 |
[% ELSE %] |
218 |
|
60 |
<div class="alert alert-info">Recalls have not been enabled. Enable the <a href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">UseRecalls</a> system preference to use recalls.</div> |
219 |
<h2>Existing recalls</h2> |
|
|
220 |
|
221 |
[% IF Koha.Preference('UseRecalls') %] |
222 |
[% IF recalls.count %] |
223 |
<div class="page-section"> |
224 |
<form method="post" action="/cgi-bin/koha/recalls/request.pl"> |
225 |
[% INCLUDE 'csrf-token.inc' %] |
226 |
<input type="hidden" name="op" value="cud-cancel_multiple_recalls"> |
227 |
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]"> |
228 |
<input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span> |
229 |
[% INCLUDE 'recalls.inc' %] |
230 |
<fieldset class="action"> |
231 |
<button type="submit" id="cancel_selected" class="btn btn-default btn-sm">Cancel selected recalls</button> |
232 |
</fieldset> |
233 |
</form> |
234 |
</div> <!-- /.page-section --> |
235 |
[% ELSE %] |
236 |
<div class="alert alert-info">No recalls have been made.</div> |
237 |
[% END %] |
238 |
[% ELSE %] |
239 |
<div class="alert alert-info">Recalls have not been enabled. Enable the <a href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">UseRecalls</a> system preference to use recalls.</div> |
240 |
[% END %] |
241 |
|
61 |
[% END %] |
242 |
[% END %] |
62 |
|
243 |
|
63 |
</main> |
244 |
</main> |
Lines 76-81
Link Here
|
76 |
[% Asset.js("js/recalls.js") | $raw %] |
257 |
[% Asset.js("js/recalls.js") | $raw %] |
77 |
[% INCLUDE 'datatables.inc' %] |
258 |
[% INCLUDE 'datatables.inc' %] |
78 |
[% INCLUDE 'columns_settings.inc' %] |
259 |
[% INCLUDE 'columns_settings.inc' %] |
|
|
260 |
[% INCLUDE 'calendar.inc' %] |
261 |
[% SET url_biblio_params = "biblionumber=" _ biblio.biblionumber %] |
262 |
[% PROCESS patron_search_js table_id => 'table_borrowers', categories => categories, libraries => libraries, extended_attribute_types => attribute_type_codes, 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' %] |
263 |
<script> |
264 |
table_settings = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]; |
265 |
$(document).ready(function(){ |
266 |
$("#recalls_patronsearch").on("submit", filter); |
267 |
[% UNLESS patron %] |
268 |
[% IF ( PatronAutoComplete ) %] |
269 |
patron_autocomplete($("#search_patron_filter"), { 'link-to': 'recall', 'url-params': '[% url_biblio_params | url %]' }); |
270 |
[% END %] |
271 |
[% END %] |
272 |
$("#items").dataTable($.extend(true, {}, dataTablesDefaults, { |
273 |
'bPaginate': false, |
274 |
"sDom": '<"top pager"ilf>t', |
275 |
})); |
276 |
|
277 |
//Override fieldset styling for dataTables search box |
278 |
$("div.top.pager").css("margin-left","1em"); |
279 |
$(".dataTables_filter label").css({ |
280 |
"width":"auto", |
281 |
"margin-right":"0em" |
282 |
}); |
283 |
$("#type").click(function() { |
284 |
if(this.checked){ |
285 |
$("input[name=itemnumber]").each(function() { |
286 |
$(this).prop("checked", false); |
287 |
}); |
288 |
} |
289 |
}); |
290 |
$("input[name=itemnumber]").click(function() { |
291 |
$("input[name=itemnumber]").each(function() { |
292 |
if(this.checked){ |
293 |
$("#type").prop("checked", false); |
294 |
} |
295 |
}); |
296 |
}); |
297 |
}); |
298 |
</script> |
79 |
[% END %] |
299 |
[% END %] |
80 |
|
300 |
|
81 |
[% INCLUDE 'intranet-bottom.inc' %] |
301 |
[% INCLUDE 'intranet-bottom.inc' %] |