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