|
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-45
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>Place a recall on [% INCLUDE 'biblio-title.inc' link = 1 %]</h1> |
| 27 |
|
48 |
|
| 28 |
[% IF Koha.Preference('UseRecalls') %] |
49 |
[% IF patron %] |
| 29 |
[% IF recalls.count %] |
50 |
|
| 30 |
<form method="post" action="/cgi-bin/koha/recalls/request.pl"> |
51 |
[% IF error %] |
| 31 |
<input type="hidden" name="op" value="cancel_multiple_recalls"> |
52 |
<div class="dialog alert"> |
| 32 |
<input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span> |
53 |
Unable to place a recall. Check your circulation rules. |
| 33 |
[% INCLUDE 'recalls.inc' %] |
54 |
</div> |
|
|
55 |
[% END %] |
| 56 |
|
| 57 |
<fieldset class="rows"> |
| 58 |
<legend>Recall details</legend> |
| 59 |
<form id="recallform" action="/cgi-bin/koha/recalls/request.pl" method="post"> |
| 60 |
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]"> |
| 61 |
|
| 62 |
<ol> |
| 63 |
<li> |
| 64 |
<label for="borrowernumber">Patron:</label> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% INCLUDE 'patron-title.inc' %]</a> |
| 65 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"> |
| 66 |
</li> |
| 67 |
|
| 68 |
[% UNLESS ( single_branch_mode ) %]<li> |
| 69 |
<label for="pickup">Pick up location:</label> |
| 70 |
<select name="pickup" id="pickup"> |
| 71 |
[% FOREACH branch IN branches %] |
| 72 |
[% IF branch.branchcode == patron.branchcode %] |
| 73 |
<option value="[% branch.branchcode | html %]" selected>[% Branches.GetName( branch.branchcode ) | html %]</option> |
| 74 |
[% ELSE %] |
| 75 |
<option value="[% branch.branchcode | html %]">[% Branches.GetName( branch.branchcode ) | html %]</option> |
| 76 |
[% END %] |
| 77 |
[% END %] |
| 78 |
</select> |
| 79 |
</li>[% END %] |
| 80 |
|
| 81 |
<li><label for="expirationdate">Recall not needed after:</label> <input type="text" name="expirationdate" id="expirationdate" size="20" class="flatpickr"> <a id="cleartext" style="display:none;">Clear text</a><span id="expiration-hint">[% INCLUDE 'date-format.inc' %]</span></li> |
| 82 |
<li class="level-option" style="display:none;"><label for="bibliolevel">Recall next available item</label> <input type="radio" name="type" id="bibliolevel" value="bibliolevel" checked></li> |
| 83 |
<li class="level-option" style="display:none;"><label for="itemlevel">Recall a specific item</label> <input type="radio" name="type" id="itemlevel" value="itemlevel"></li> |
| 84 |
|
| 85 |
<table id="items"> |
| 86 |
<caption>Select a specific item:</caption> |
| 87 |
<tr> |
| 88 |
<th> </th> |
| 89 |
<th>Item type</th> |
| 90 |
<th>Barcode</th> |
| 91 |
[% UNLESS ( single_branch_mode ) %] |
| 92 |
<th>Home library</th> |
| 93 |
<th>Last location</th> |
| 94 |
[% END %] |
| 95 |
<th>Collection</th> |
| 96 |
<th>Call number</th> |
| 97 |
<th>Copy number</th> |
| 98 |
<th>Vol info</th> |
| 99 |
<th>Information</th> |
| 100 |
</tr> |
| 101 |
[% FOREACH item IN items %]<tr> |
| 102 |
<td> |
| 103 |
[% IF item.can_be_recalled( patron => patron ) %] |
| 104 |
<input type="radio" class="itemnumber" name="itemnumber" value="[% item.itemnumber | html %]"> |
| 105 |
[% ELSE %] |
| 106 |
<input disabled="disabled" type="radio" class="itemnumber" name="itemnumber" value="[% item.itemnumber | html %]" style="display:none;" /> |
| 107 |
<img src="[% interface | html %]/lib/famfamfam/cross.png" alt="Cannot be recalled" title="Cannot be recalled" /> |
| 108 |
[% END %] |
| 109 |
</td> |
| 110 |
<td>[% ItemTypes.GetDescription( item.effective_itemtype ) | html %]</td> |
| 111 |
<td>[% item.barcode | html %]</td> |
| 112 |
[% UNLESS ( single_branch_mode ) %] |
| 113 |
<td>[% Branches.GetName( item.homebranch ) | html %]</td> |
| 114 |
<td>[% Branches.GetName( item.holdingbranch) | html %]</td> |
| 115 |
[% END %] |
| 116 |
<td>[% AuthorisedValues.GetByCode( 'CCODE', item.ccode, 1 ) | html %]</td> |
| 117 |
<td>[% item.itemcallnumber | html %]</td> |
| 118 |
<td>[% item.copynumber | html %]</td> |
| 119 |
<td>[% item.enumchron | html %]</td> |
| 120 |
<td> |
| 121 |
[% IF ( item.checkout ) %] |
| 122 |
<span class="checkedout">Due [% item.checkout.date_due | $KohaDates %]</span> |
| 123 |
[% ELSIF ( item.get_transfer ) %] |
| 124 |
<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> |
| 125 |
[% END %] |
| 126 |
[% IF ( item.itemlost || item.withdrawn ) %] |
| 127 |
<span class="lost">Unavailable (lost or missing)</span> |
| 128 |
[% END %] |
| 129 |
[% IF ( item.notforloan ) %] |
| 130 |
<span class="notforloan">Not for loan ([% item.notforloan | html %])</span> |
| 131 |
[% END %] |
| 132 |
[% hold = item.current_holds.next %] |
| 133 |
[% IF ( item.recall ) %] |
| 134 |
<span class="waiting"> |
| 135 |
[% IF ( item.recall.waitingdate ) %] |
| 136 |
Waiting for patron at [% Branches.GetName( item.recall.branchcode ) | html %] since [% item.recall.waitingdate | $KohaDates %]. |
| 137 |
[% ELSIF ( item.recall.itemnumber == item.itemnumber ) %] |
| 138 |
Recalled by patron expected at [% Branches.GetName( item.recall.branchcode ) | html %] since [% item.recall.recalldate | $KohaDates %]. |
| 139 |
[% END %] |
| 140 |
</span> |
| 141 |
[% ELSIF ( hold.waitingdate ) %] |
| 142 |
<span class="waiting"> |
| 143 |
Waiting for patron at [% Branches.GetName( hold.branchcode ) | html %] since [% hold.waitingdate | $KohaDates %]. |
| 144 |
</span> |
| 145 |
[% ELSIF ( hold.borrowernumber == logged_in_user.borrowernumber ) %] |
| 146 |
<span class="waiting"> |
| 147 |
Patron has already placed a <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% patron.borrowernumber | uri %]#reserves">reserve</a> on this item. |
| 148 |
</span> |
| 149 |
[% END # / IF ( item.recall or hold ) %] |
| 150 |
</td> |
| 151 |
</tr>[% END %] |
| 152 |
</table> |
| 153 |
</fieldset> |
| 34 |
<fieldset class="action"> |
154 |
<fieldset class="action"> |
| 35 |
<button type="submit" id="cancel_selected" class="btn btn-default btn-sm">Cancel selected recalls</button> |
155 |
<input type="hidden" name="op" value="request"> |
|
|
156 |
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html %]"> |
| 157 |
[% IF error %] |
| 158 |
<input type="submit" class="btn btn-primary" value="Confirm" disabled="disabled"> |
| 159 |
[% ELSE %] |
| 160 |
<input type="submit" class="btn btn-primary" value="Confirm"> |
| 161 |
[% END %] |
| 162 |
<a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% biblio.biblionumber | uri %]" class="cancel">Cancel</a> |
| 36 |
</fieldset> |
163 |
</fieldset> |
| 37 |
</form> |
164 |
</form> |
|
|
165 |
|
| 166 |
[% ELSE %] |
| 167 |
|
| 168 |
[% IF Koha.Preference('RecallsInterface') == 'opac' %] |
| 169 |
<div class="dialog alert"> |
| 170 |
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. |
| 171 |
</div> |
| 38 |
[% ELSE %] |
172 |
[% ELSE %] |
| 39 |
<div class="dialog message">No recalls have been made.</div> |
173 |
|
|
|
174 |
<fieldset> |
| 175 |
<h2>Search patrons</h2> |
| 176 |
<div id="circ_recalls_select" class="toptabs"> |
| 177 |
<ul class="nav nav-tabs" role="tablist"> |
| 178 |
<li role="presentation" class="active"><a href="#recalls_patronsearch_pane" aria-controls="recalls_patronsearch_pane" role="tab" data-toggle="tab">Patrons</a></li> |
| 179 |
</ul> |
| 180 |
<div class="tab-content"> |
| 181 |
<div id="recalls_patronsearch_pane" role="tabpanel" class="tab-pane active"> |
| 182 |
[% PROCESS patron_search_filters_simple %] |
| 183 |
[% PROCESS patron_search_table table_id => 'table_borrowers', open_on_row_click => 1 %] |
| 184 |
</div> |
| 185 |
</div> <!-- /.tab-content --> |
| 186 |
</div> |
| 187 |
</fieldset> |
| 188 |
|
| 40 |
[% END %] |
189 |
[% END %] |
| 41 |
[% ELSE %] |
190 |
|
| 42 |
<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> |
191 |
<h2>Existing recalls</h2> |
|
|
192 |
|
| 193 |
[% IF Koha.Preference('UseRecalls') %] |
| 194 |
[% IF recalls.count %] |
| 195 |
<form method="post" action="/cgi-bin/koha/recalls/request.pl"> |
| 196 |
<input type="hidden" name="op" value="cancel_multiple_recalls"> |
| 197 |
<input type="checkbox" id="select_all"> <span id="select_all_text">Select all</span> |
| 198 |
[% INCLUDE 'recalls.inc' %] |
| 199 |
<fieldset class="action"> |
| 200 |
<button type="submit" id="cancel_selected" class="btn btn-default btn-sm">Cancel selected recalls</button> |
| 201 |
</fieldset> |
| 202 |
</form> |
| 203 |
[% ELSE %] |
| 204 |
<div class="dialog message">No recalls have been made.</div> |
| 205 |
[% END %] |
| 206 |
[% ELSE %] |
| 207 |
<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> |
| 208 |
[% END %] |
| 209 |
|
| 43 |
[% END %] |
210 |
[% END %] |
| 44 |
|
211 |
|
| 45 |
</main> |
212 |
</main> |
|
Lines 58-63
Link Here
|
| 58 |
[% Asset.js("js/recalls.js") | $raw %] |
225 |
[% Asset.js("js/recalls.js") | $raw %] |
| 59 |
[% INCLUDE 'datatables.inc' %] |
226 |
[% INCLUDE 'datatables.inc' %] |
| 60 |
[% INCLUDE 'columns_settings.inc' %] |
227 |
[% INCLUDE 'columns_settings.inc' %] |
|
|
228 |
[% INCLUDE 'calendar.inc' %] |
| 229 |
[% SET url_biblio_params = "biblionumber=" _ biblionumbers.join("&biblionumber=") %] |
| 230 |
[% 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' %] |
| 231 |
<script> |
| 232 |
table_settings = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]; |
| 233 |
$(document).ready(function(){ |
| 234 |
[% UNLESS findborrower %] |
| 235 |
[% IF ( PatronAutoComplete ) %] |
| 236 |
patron_autocomplete($("#search_patron_filter"), { 'link-to': 'recall', 'url-params': '[% url_biblio_params | url %]' }); |
| 237 |
[% END %] |
| 238 |
[% END %] |
| 239 |
$(".level-option").show(); |
| 240 |
$("#cleartext").show(); |
| 241 |
$("#items").hide(); |
| 242 |
$("#expiration-hint").hide(); |
| 243 |
$("#cleartext").click(function(){ |
| 244 |
$(this).siblings("input").val(""); |
| 245 |
}); |
| 246 |
$("#itemlevel").click(function(){ |
| 247 |
if ( $("#itemlevel").is(':checked') ){ |
| 248 |
$("#items").show(); |
| 249 |
$("input:radio[name='itemnumber']:not(:disabled)").first().attr("checked", "checked"); // selects first item in table |
| 250 |
} |
| 251 |
}); |
| 252 |
$("#bibliolevel").click(function(){ |
| 253 |
if ( $("#bibliolevel").is(':checked') ){ |
| 254 |
$("#items").hide(); |
| 255 |
} |
| 256 |
}); |
| 257 |
$("#recalls_patronsearch").on("submit", filter); |
| 258 |
}); |
| 259 |
</script> |
| 61 |
[% END %] |
260 |
[% END %] |
| 62 |
|
261 |
|
| 63 |
[% INCLUDE 'intranet-bottom.inc' %] |
262 |
[% INCLUDE 'intranet-bottom.inc' %] |