|
Lines 73-79
Link Here
|
| 73 |
<h1>Confirm holds</h1> |
73 |
<h1>Confirm holds</h1> |
| 74 |
[% END %] |
74 |
[% END %] |
| 75 |
|
75 |
|
| 76 |
[% UNLESS patron OR patron.borrowernumber OR noitems %] |
76 |
[% UNLESS club OR patron OR patron.borrowernumber OR noitems %] |
| 77 |
[% IF ( messageborrower ) %] |
77 |
[% IF ( messageborrower ) %] |
| 78 |
<div class="dialog alert"> |
78 |
<div class="dialog alert"> |
| 79 |
<h3>Patron not found</h3> |
79 |
<h3>Patron not found</h3> |
|
Lines 81-110
Link Here
|
| 81 |
</div> |
81 |
</div> |
| 82 |
[% END %] |
82 |
[% END %] |
| 83 |
|
83 |
|
| 84 |
<form id="holds_patronsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post"> |
84 |
[% IF ( messageclub ) %] |
| 85 |
<fieldset id="circ_holds_selectborrower" class="brief"> |
85 |
<div class="dialog alert"> |
| 86 |
[% UNLESS borrowers %] |
86 |
<h3>Club not found</h3> |
| 87 |
<label for="patron">Patron: </label> |
87 |
<p>No club with this name, please, try another</p> |
| 88 |
<div class="hint">Enter patron card number or partial name:</div> |
88 |
</div> |
| 89 |
<input type="text" size="40" id="patron" class="focus" name="findborrower" autocomplete="off" /> |
89 |
[% END %] |
| 90 |
<input type="submit" value="Search" /> |
90 |
<fieldset class="brief"> |
| 91 |
[% IF multi_hold %] |
91 |
<label>Seach Patrons or clubs</label> |
| 92 |
<input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> |
92 |
<div id="circ_holds_select"> |
| 93 |
<input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
93 |
<ul class="nav nav-tabs" role="tablist"> |
| 94 |
[% ELSE %] |
94 |
<li role="presentation"><a href="#holds_patronsearch_pane" aria-controls="holds_patronsearch_pane" role="tab" data-toggle="tab">Patrons</a></li> |
| 95 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
95 |
<li role="presentation"><a href="#holds_clubsearch_pane" aria-controls="holds_clubsearch_pane" role="tab" data-toggle="tab">Clubs</a></li> |
| 96 |
[% END %] |
96 |
</ul> |
| 97 |
[% ELSE %] |
97 |
<div class="tab-content"> |
|
|
98 |
<div role="tabpanel" class="tab-pane" id="holds_patronsearch_pane"> |
| 99 |
<form id="holds_patronsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post"> |
| 100 |
<div class="hint">Enter patron card number or partial name:</div> |
| 101 |
<input type="text" size="40" id="patron" class="focus" name="findborrower" autocomplete="off" /> |
| 102 |
<input type="submit" value="Search" /> |
| 103 |
[% IF multi_hold %] |
| 104 |
<input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> |
| 105 |
<input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
| 106 |
[% ELSE %] |
| 107 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
| 108 |
[% END %] |
| 109 |
|
| 110 |
[% IF ( multi_hold ) %] |
| 111 |
<input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> |
| 112 |
<input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
| 113 |
[% END %] |
| 114 |
</form> <!-- /#holds_patronsearch --> |
| 115 |
</div> |
| 116 |
<div role="tabpanel" class="tab-pane" id="holds_clubsearch_pane"> |
| 117 |
<form id="holds_clubsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post"> |
| 118 |
<div class="hint">Enter club id or partial name:</div> |
| 119 |
<input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" /> |
| 120 |
<input type="submit" value="Search" /> |
| 121 |
[% IF multi_hold %] |
| 122 |
<input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> |
| 123 |
<input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
| 124 |
[% ELSE %] |
| 125 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
| 126 |
[% END %] |
| 127 |
|
| 128 |
[% IF ( multi_hold ) %] |
| 129 |
<input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> |
| 130 |
<input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
| 131 |
[% END %] |
| 132 |
</form> <!-- /#holds_patronsearch --> |
| 133 |
</div> |
| 134 |
</div> |
| 135 |
</div> |
| 136 |
<p> |
| 137 |
[% IF borrowers %] |
| 98 |
[% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %] |
138 |
[% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %] |
|
|
139 |
[% ELSIF clubs %] |
| 140 |
[% INCLUDE 'clubs-table.inc' destination = "holds" %] |
| 99 |
[% END %] |
141 |
[% END %] |
| 100 |
</fieldset> <!-- /#circ_holds_selectborrower --> |
142 |
</p> |
|
|
143 |
</fieldset> |
| 144 |
[% ELSIF club %] |
| 145 |
<div class="dialog alert hide clubalert"> |
| 146 |
</div> |
| 147 |
<fieldset class="rows"> |
| 148 |
<legend>Hold details</legend> |
| 149 |
<form action="/api/v1/clubs/[% club.id | html %]/holds" method="post" name="form" id="club-request-form"> |
| 101 |
|
150 |
|
| 102 |
[% IF ( multi_hold ) %] |
151 |
[% IF ( multi_hold ) %] |
| 103 |
<input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> |
152 |
<input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> |
| 104 |
<input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
153 |
<input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/> |
| 105 |
[% END %] |
154 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
| 106 |
</form> <!-- /#holds_patronsearch --> |
155 |
<input type="hidden" name="request" value="any"/> |
|
|
156 |
[% FOREACH biblioloo IN biblioloop %] |
| 157 |
<input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/> |
| 158 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
| 159 |
[% END %] |
| 160 |
[% ELSE %] |
| 161 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
| 162 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
| 163 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
| 164 |
[% END # /IF multi_hold %] |
| 165 |
<ol> |
| 166 |
<li> |
| 167 |
<span class="label">Club: </span> [% club.name | html %] |
| 168 |
</li> |
| 169 |
<li> |
| 170 |
<span class="label">Description: </span> [% club.description | html %] |
| 171 |
</li> |
| 172 |
<li> |
| 173 |
<label for="pickup">Pickup at:</label> |
| 174 |
<select name="pickup" size="1" id="pickup"> |
| 175 |
[% PROCESS options_for_libraries libraries => Branches.all({ selected => club.branchcode, search_params => { pickup_location => 1 } }) %] |
| 176 |
</select> |
| 177 |
</li> |
| 178 |
</ol> |
| 179 |
<h2 style="padding: 0 1em;">Members</h2> |
| 180 |
<ol> |
| 181 |
[% FOREACH member IN members %] |
| 182 |
[% SET patron = member.patron %] |
| 183 |
<li style="padding: 0.5em 1em;"> |
| 184 |
<div><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a></div> |
| 185 |
[% IF member.exceeded_maxreserves %] |
| 186 |
<div> |
| 187 |
<i class="fa fa-error"></i> |
| 188 |
<strong>Too many holds: </strong> Patron can only place a maximum of [% maxreserves | html %] total holds. |
| 189 |
</div> |
| 190 |
[% END %] |
| 191 |
[% IF ( member.expiry ) %] |
| 192 |
<div> |
| 193 |
<i class="fa fa-warning"></i> |
| 194 |
<strong>Account has expired</strong> |
| 195 |
</div> |
| 196 |
[% END %] |
| 197 |
[% IF patron.is_debarred %] |
| 198 |
<div> |
| 199 |
<i class="fa fa-warning"></i> |
| 200 |
<strong>Patron has restrictions</strong> |
| 201 |
</div> |
| 202 |
[% END %] |
| 203 |
[% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %] |
| 204 |
<div> |
| 205 |
<i class="fa fa-warning"></i> |
| 206 |
<strong>Patron has outstanding fines: [% member.amount_outstanding | $Price %]</strong> |
| 207 |
</div> |
| 208 |
[% END %] |
| 107 |
|
209 |
|
|
|
210 |
[% IF ( member.diffbranch ) %] |
| 211 |
<div> |
| 212 |
<i class="fa fa-warning"></i> |
| 213 |
<strong>Pickup library is different.</strong> Patron's home library: ([% Branches.GetName(patron.branchcode) | html %] / [% patron.branchcode | html %] ) |
| 214 |
</div> |
| 215 |
[% END %] |
| 216 |
</li> |
| 217 |
[% END %] |
| 218 |
</ol> |
| 219 |
[% UNLESS ( multi_hold ) %] |
| 220 |
<fieldset class="action"> |
| 221 |
<input type="submit" value="Place hold" /> |
| 222 |
</fieldset> |
| 223 |
[% ELSE %] |
| 224 |
<table id="requesttitles"> |
| 225 |
<tr> |
| 226 |
<th> </th> |
| 227 |
<th>Title</th> |
| 228 |
[% UNLESS ( item_level_itypes ) %] |
| 229 |
<th>Item type</th> |
| 230 |
[% END %] |
| 231 |
<th>Priority</th> |
| 232 |
<th>Information</th> |
| 233 |
</tr> |
| 234 |
[% FOREACH biblioloo IN biblioloop %] |
| 235 |
[% IF ( biblioloo.warn ) %] |
| 236 |
<tr class="onissue"> |
| 237 |
[% ELSE %] |
| 238 |
<tr> |
| 239 |
[% END %] |
| 240 |
<td> |
| 241 |
[% UNLESS ( biblioloo.warn ) %] |
| 242 |
<input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/> |
| 243 |
</td> |
| 244 |
[% END %] |
| 245 |
<td> |
| 246 |
<ul> |
| 247 |
<li> |
| 248 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a> |
| 249 |
</li> |
| 250 |
[% IF ( biblioloo.publicationyear ) %] |
| 251 |
<li> |
| 252 |
<span class="label">Publication year:</span> [% biblioloo.publicationyear | html %] |
| 253 |
</li> |
| 254 |
[% END %] |
| 255 |
</ul> |
| 256 |
[% IF ( biblioloo.warn ) %] |
| 257 |
<span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span> |
| 258 |
[% END %] |
| 259 |
</td> |
| 260 |
[% UNLESS ( item_level_itypes ) %] |
| 261 |
<td> |
| 262 |
<img src="[% biblioloo.imageurl | html %]" alt="[% biblioloo.itypename | html %]" title="[% biblioloo.itypename | html %]" /> |
| 263 |
</td> |
| 264 |
[% END %] |
| 265 |
<td>[% biblioloo.rank | html %]</td> |
| 266 |
<td> |
| 267 |
[% IF ( biblioloo.checked_previously ) %] |
| 268 |
<span>Patron has previously checked out this title</span><br/> |
| 269 |
[% END %] |
| 270 |
[% IF ( biblioloo.alreadyres ) %] |
| 271 |
<ul> |
| 272 |
[% ELSE %] |
| 273 |
[% IF ( biblioloo.none_avail ) %] |
| 274 |
<ul> |
| 275 |
[% END %] |
| 276 |
[% END %] |
| 277 |
|
| 278 |
[% IF ( biblioloo.alreadyres ) %] |
| 279 |
<li> |
| 280 |
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a> |
| 281 |
<strong>already has a hold</strong> on this item |
| 282 |
</li> |
| 283 |
[% END %] |
| 284 |
[% IF ( biblioloo.none_avail ) %] |
| 285 |
<li> <strong>No items are available</strong> to be placed on hold</li> |
| 286 |
[% END %] |
| 287 |
|
| 288 |
[% IF ( biblioloo.alreadyres ) %] |
| 289 |
</ul> |
| 290 |
[% ELSE %] |
| 291 |
[% IF ( biblioloo.none_avail ) %] |
| 292 |
</ul> |
| 293 |
[% END %] |
| 294 |
[% END %] |
| 295 |
</td> |
| 296 |
</tr> |
| 297 |
[% END # /FOREACH biblioloo %] |
| 298 |
</table> <!-- /#requesttitles --> |
| 299 |
[% END %] |
| 300 |
</form> |
| 301 |
</fieldset> |
| 108 |
[% ELSIF NOT noitems # /UNLESS patron %] |
302 |
[% ELSIF NOT noitems # /UNLESS patron %] |
| 109 |
|
303 |
|
| 110 |
[% IF ( checked_previously && !multi_hold ) %] |
304 |
[% IF ( checked_previously && !multi_hold ) %] |
|
Lines 183-189
Link Here
|
| 183 |
|
377 |
|
| 184 |
<fieldset class="rows"> |
378 |
<fieldset class="rows"> |
| 185 |
<legend>Hold details</legend> |
379 |
<legend>Hold details</legend> |
| 186 |
<form action="placerequest.pl" method="post" name="form" id="hold-request-form"> |
380 |
<form action="/api/v1/holds" method="post" name="form" id="hold-request-form"> |
| 187 |
|
381 |
|
| 188 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
382 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
| 189 |
<input type="hidden" name="type" value="str8" /> |
383 |
<input type="hidden" name="type" value="str8" /> |
|
Lines 752-757
Link Here
|
| 752 |
columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %] |
946 |
columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %] |
| 753 |
|
947 |
|
| 754 |
$(document).ready(function() { |
948 |
$(document).ready(function() { |
|
|
949 |
[% UNLESS clubs %] |
| 950 |
$('#circ_holds_select').tabs({active: 0}); |
| 951 |
[% ELSE %] |
| 952 |
$('#circ_holds_select').tabs({active: 1}); |
| 953 |
[% END %] |
| 755 |
function ToggleHoldsToPlace() { |
954 |
function ToggleHoldsToPlace() { |
| 756 |
if ( $("#requestany").prop('checked') ) { |
955 |
if ( $("#requestany").prop('checked') ) { |
| 757 |
$("#holds_to_place_count").prop('disabled', false); |
956 |
$("#holds_to_place_count").prop('disabled', false); |
|
Lines 793-798
Link Here
|
| 793 |
"margin-right":"0em" |
992 |
"margin-right":"0em" |
| 794 |
}); |
993 |
}); |
| 795 |
|
994 |
|
|
|
995 |
$("#club-request-form").on("submit", function() { |
| 996 |
let $t = $(this); |
| 997 |
$('.clubalert').addClass('hide'); |
| 998 |
let options = { |
| 999 |
url: $t.attr('action'), |
| 1000 |
method: $t.attr('method').toUpperCase(), |
| 1001 |
contentType: 'application/json', |
| 1002 |
data: JSON.stringify({ |
| 1003 |
biblio_id: biblionumber, |
| 1004 |
pickup_library_id: $('select[name="pickup"]').val() |
| 1005 |
}) |
| 1006 |
}; |
| 1007 |
if($('input[name="checkitem"]:checked').length) |
| 1008 |
options.data.item_id = $('input[name="checkitem"]:checked').val(); |
| 1009 |
$.ajax(options) |
| 1010 |
.then(function(result) { |
| 1011 |
let url = 'request.pl?biblionumber='+biblionumber+($('input[name="multi_hold"]').length && $('input[name="multi_hold"]').val()?'&multi_hold=1':''); |
| 1012 |
document.location = url; |
| 1013 |
}) |
| 1014 |
.fail(function(err) { |
| 1015 |
$('.clubalert').removeClass('hide').html(err.responseJSON.error); |
| 1016 |
}); |
| 1017 |
return false; |
| 1018 |
}); |
| 1019 |
|
| 796 |
[% UNLESS ( multi_hold ) %] |
1020 |
[% UNLESS ( multi_hold ) %] |
| 797 |
$("#hold-request-form").on("submit", function(){ |
1021 |
$("#hold-request-form").on("submit", function(){ |
| 798 |
return check(); |
1022 |
return check(); |