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 36-61
Link Here
|
36 |
<div class="col-sm-10 col-sm-push-2"> |
45 |
<div class="col-sm-10 col-sm-push-2"> |
37 |
<main> |
46 |
<main> |
38 |
|
47 |
|
39 |
<h1>Existing recalls</h1> |
48 |
<h1>Recalls</h1> |
40 |
|
49 |
|
41 |
[% IF Koha.Preference('UseRecalls') %] |
50 |
======= |
42 |
[% IF recalls.count %] |
51 |
<h2>Place a recall on [% INCLUDE 'biblio-title.inc' link = 1 %]</h2> |
43 |
<div class="page-section"> |
52 |
|
44 |
<form method="post" action="/cgi-bin/koha/recalls/request.pl"> |
53 |
[% IF patron %] |
45 |
<input type="hidden" name="op" value="cancel_multiple_recalls"> |
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 |
<input type="hidden" name="op" value="request"> |
95 |
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]"> |
96 |
[% IF error %] |
97 |
<input type="submit" class="btn btn-default" value="Place recall" disabled="disabled"> |
98 |
[% ELSE %] |
99 |
<input type="submit" class="btn btn-default" value="Place recall"> |
100 |
[% END %] |
101 |
<a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% biblio.biblionumber | uri %]" class="cancel">Cancel</a> |
102 |
</fieldset> |
103 |
|
104 |
<table id="items"> |
105 |
<caption>Place a recall on a specific item</caption> |
106 |
<thead> |
107 |
<tr> |
108 |
<th> </th> |
109 |
<th>Item type</th> |
110 |
<th>Barcode</th> |
111 |
[% UNLESS ( single_branch_mode ) %] |
112 |
<th>Home library</th> |
113 |
<th>Last location</th> |
114 |
[% END %] |
115 |
<th>Collection</th> |
116 |
<th>Call number</th> |
117 |
<th>Copy number</th> |
118 |
<th>Vol no.</th> |
119 |
<th>Information</th> |
120 |
</tr> |
121 |
</thead> |
122 |
<tbody> |
123 |
[% FOREACH item IN items %]<tr> |
124 |
<td> |
125 |
[% IF item.can_be_recalled( patron => patron ) %] |
126 |
<input type="radio" class="itemnumber" name="itemnumber" value="[% item.itemnumber | html %]"> |
127 |
[% ELSE %] |
128 |
<span class="error"> |
129 |
<i class="fa fa-times fa-lg" title="Cannot be recalled"></i> |
130 |
</span> |
131 |
[% END %] |
132 |
</td> |
133 |
<td>[% ItemTypes.GetDescription( item.effective_itemtype ) | html %]</td> |
134 |
<td>[% item.barcode | html %]</td> |
135 |
[% UNLESS ( single_branch_mode ) %] |
136 |
<td>[% Branches.GetName( item.homebranch ) | html %]</td> |
137 |
<td>[% Branches.GetName( item.holdingbranch) | html %]</td> |
138 |
[% END %] |
139 |
<td>[% AuthorisedValues.GetByCode( 'CCODE', item.ccode, 1 ) | html %]</td> |
140 |
<td>[% item.itemcallnumber | html %]</td> |
141 |
<td>[% item.copynumber | html %]</td> |
142 |
<td>[% item.enumchron | html %]</td> |
143 |
<td> |
144 |
[% IF ( item.checkout ) %] |
145 |
<span class="checkedout">Due [% item.checkout.date_due | $KohaDates %]</span> |
146 |
[% ELSIF ( item.get_transfer ) %] |
147 |
<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> |
148 |
[% END %] |
149 |
[% IF ( item.itemlost || item.withdrawn ) %] |
150 |
<span class="lost">Unavailable (lost or missing)</span> |
151 |
[% END %] |
152 |
[% IF ( item.notforloan ) %] |
153 |
<span class="notforloan">Not for loan ([% item.notforloan | html %])</span> |
154 |
[% END %] |
155 |
[% hold = item.current_holds.next %] |
156 |
[% IF ( item.recall ) %] |
157 |
<span class="waiting"> |
158 |
[% IF ( item.recall.waiting_date ) %] |
159 |
Waiting for patron at [% Branches.GetName( item.recall.pickup_library_id ) | html %] since [% item.recall.waiting_date | $KohaDates %]. |
160 |
[% ELSIF ( item.recall.item_id == item.itemnumber ) %] |
161 |
Recalled by patron expected at [% Branches.GetName( item.recall.pickup_library_id ) | html %] since [% item.recall.created_date | $KohaDates %]. |
162 |
[% END %] |
163 |
</span> |
164 |
[% ELSIF ( hold.waitingdate ) %] |
165 |
<span class="waiting"> |
166 |
Waiting for patron at [% Branches.GetName( hold.branchcode ) | html %] since [% hold.waitingdate | $KohaDates %]. |
167 |
</span> |
168 |
[% ELSIF ( hold.borrowernumber == logged_in_user.borrowernumber ) %] |
169 |
<span class="waiting"> |
170 |
Patron has already placed a <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% patron.borrowernumber | uri %]#reserves">reserve</a> on this item. |
171 |
</span> |
172 |
[% END # / IF ( item.recall or hold ) %] |
173 |
</td> |
174 |
</tr>[% END %] |
175 |
</tbody> |
176 |
</table> |
177 |
|
178 |
<fieldset class="action"> |
179 |
<input type="hidden" name="op" value="request"> |
46 |
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]"> |
180 |
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]"> |
47 |
<input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span> |
181 |
[% IF error %] |
48 |
[% INCLUDE 'recalls.inc' %] |
182 |
<input type="submit" class="btn btn-default" value="Place recall" disabled="disabled"> |
49 |
<fieldset class="action"> |
183 |
[% ELSE %] |
50 |
<button type="submit" id="cancel_selected" class="btn btn-default btn-sm">Cancel selected recalls</button> |
184 |
<input type="submit" class="btn btn-default" value="Place recall"> |
51 |
</fieldset> |
185 |
[% END %] |
52 |
</form> |
186 |
<a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% biblio.biblionumber | uri %]" class="cancel">Cancel</a> |
53 |
</div> <!-- /.page-section --> |
187 |
</fieldset> |
|
|
188 |
</form> |
189 |
|
190 |
</fieldset> |
191 |
|
192 |
[% ELSE %] |
193 |
|
194 |
[% IF Koha.Preference('RecallsInterface') == 'opac' %] |
195 |
<div class="dialog alert"> |
196 |
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. |
197 |
</div> |
54 |
[% ELSE %] |
198 |
[% ELSE %] |
55 |
<div class="dialog message">No recalls have been made.</div> |
199 |
|
|
|
200 |
<fieldset> |
201 |
<h2>Search patrons</h2> |
202 |
<div id="circ_recalls_select" class="toptabs"> |
203 |
<ul class="nav nav-tabs" role="tablist"> |
204 |
<li role="presentation" class="active"><a href="#recalls_patronsearch_pane" aria-controls="recalls_patronsearch_pane" role="tab" data-toggle="tab">Patrons</a></li> |
205 |
</ul> |
206 |
<div class="tab-content"> |
207 |
<div id="recalls_patronsearch_pane" role="tabpanel" class="tab-pane active"> |
208 |
[% PROCESS patron_search_filters_simple %] |
209 |
[% PROCESS patron_search_table table_id => 'table_borrowers', open_on_row_click => 1 %] |
210 |
</div> |
211 |
</div> <!-- /.tab-content --> |
212 |
</div> |
213 |
</fieldset> |
214 |
|
56 |
[% END %] |
215 |
[% END %] |
57 |
[% ELSE %] |
216 |
|
58 |
<div class="dialog message">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> |
217 |
<h2>Existing recalls</h2> |
|
|
218 |
|
219 |
[% IF Koha.Preference('UseRecalls') %] |
220 |
[% IF recalls.count %] |
221 |
<div class="page-section"> |
222 |
<form method="post" action="/cgi-bin/koha/recalls/request.pl"> |
223 |
<input type="hidden" name="op" value="cancel_multiple_recalls"> |
224 |
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]"> |
225 |
<input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span> |
226 |
[% INCLUDE 'recalls.inc' %] |
227 |
<fieldset class="action"> |
228 |
<button type="submit" id="cancel_selected" class="btn btn-default btn-sm">Cancel selected recalls</button> |
229 |
</fieldset> |
230 |
</form> |
231 |
</div> <!-- /.page-section --> |
232 |
[% ELSE %] |
233 |
<div class="dialog message">No recalls have been made.</div> |
234 |
[% END %] |
235 |
[% ELSE %] |
236 |
<div class="dialog message">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> |
237 |
[% END %] |
238 |
|
59 |
[% END %] |
239 |
[% END %] |
60 |
|
240 |
|
61 |
</main> |
241 |
</main> |
Lines 74-79
Link Here
|
74 |
[% Asset.js("js/recalls.js") | $raw %] |
254 |
[% Asset.js("js/recalls.js") | $raw %] |
75 |
[% INCLUDE 'datatables.inc' %] |
255 |
[% INCLUDE 'datatables.inc' %] |
76 |
[% INCLUDE 'columns_settings.inc' %] |
256 |
[% INCLUDE 'columns_settings.inc' %] |
|
|
257 |
[% INCLUDE 'calendar.inc' %] |
258 |
[% SET url_biblio_params = "biblionumber=" _ biblio.biblionumber %] |
259 |
[% 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' %] |
260 |
<script> |
261 |
table_settings = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]; |
262 |
$(document).ready(function(){ |
263 |
$("#recalls_patronsearch").on("submit", filter); |
264 |
[% UNLESS patron %] |
265 |
[% IF ( PatronAutoComplete ) %] |
266 |
patron_autocomplete($("#search_patron_filter"), { 'link-to': 'recall', 'url-params': '[% url_biblio_params | url %]' }); |
267 |
[% END %] |
268 |
[% END %] |
269 |
$("#items").dataTable($.extend(true, {}, dataTablesDefaults, { |
270 |
'bPaginate': false, |
271 |
"sDom": '<"top pager"ilf>t', |
272 |
})); |
273 |
|
274 |
//Override fieldset styling for dataTables search box |
275 |
$("div.top.pager").css("margin-left","1em"); |
276 |
$(".dataTables_filter label").css({ |
277 |
"width":"auto", |
278 |
"margin-right":"0em" |
279 |
}); |
280 |
$("#type").click(function() { |
281 |
if(this.checked){ |
282 |
$("input[name=itemnumber]").each(function() { |
283 |
$(this).prop("checked", false); |
284 |
}); |
285 |
} |
286 |
}); |
287 |
$("input[name=itemnumber]").click(function() { |
288 |
$("input[name=itemnumber]").each(function() { |
289 |
if(this.checked){ |
290 |
$("#type").prop("checked", false); |
291 |
} |
292 |
}); |
293 |
}); |
294 |
}); |
295 |
</script> |
77 |
[% END %] |
296 |
[% END %] |
78 |
|
297 |
|
79 |
[% INCLUDE 'intranet-bottom.inc' %] |
298 |
[% INCLUDE 'intranet-bottom.inc' %] |