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