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