|
Lines 20-25
Link Here
|
| 20 |
p { |
20 |
p { |
| 21 |
margin-top: 0; |
21 |
margin-top: 0; |
| 22 |
} |
22 |
} |
|
|
23 |
#locationslimit + .select2-container, |
| 24 |
#itemtypeslimit + .select2-container { |
| 25 |
max-width: 300px !important; |
| 26 |
} |
| 27 |
.main .col-md-10 #branchlimit, |
| 28 |
.main .col-md-10 #itemtypeslimit { |
| 29 |
width: 300px; |
| 30 |
} |
| 23 |
</style> |
31 |
</style> |
| 24 |
</head> |
32 |
</head> |
| 25 |
|
33 |
|
|
Lines 69-76
Link Here
|
| 69 |
>[% total | html %] <span>items found for</span> |
77 |
>[% total | html %] <span>items found for</span> |
| 70 |
[% IF ( branchlimit ) %][% Branches.GetName( branchlimit ) | html %][% ELSE %]<span>All libraries</span>[% END %] |
78 |
[% IF ( branchlimit ) %][% Branches.GetName( branchlimit ) | html %][% ELSE %]<span>All libraries</span>[% END %] |
| 71 |
[% IF ( itemtypeslimit ) %]<span>and item type: [% ItemTypes.GetDescription( itemtypeslimit ) | html %]</span>[% END %] |
79 |
[% IF ( itemtypeslimit ) %]<span>and item type: [% ItemTypes.GetDescription( itemtypeslimit ) | html %]</span>[% END %] |
| 72 |
[% IF ( ccodeslimit ) %]<span>and collection: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode' authorised_value = ccodeslimit ) | html %]</span>[% END %] |
80 |
[% IF ( ccodeslimit ) %] |
| 73 |
[% IF ( locationslimit ) %]<span>and shelving location: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location' authorised_value = locationslimit ) | html %]</span>[% END %] |
81 |
<span |
|
|
82 |
>and collection: |
| 83 |
[% FOREACH ccode IN ccodeslimit %] |
| 84 |
[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode' authorised_value = ccode ) | html %] |
| 85 |
[% UNLESS loop.last %],[% END %] |
| 86 |
[% END %] |
| 87 |
</span> |
| 88 |
[% END %] |
| 89 |
|
| 90 |
[% IF ( locationslimit ) %] |
| 91 |
<span |
| 92 |
>and shelving location: |
| 93 |
[% FOREACH loc IN locationslimit %] |
| 94 |
[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location' authorised_value = loc ) | html %] |
| 95 |
[% UNLESS loop.last %],[% END %] |
| 96 |
[% END %] |
| 97 |
</span> |
| 98 |
[% END %] |
| 74 |
</div> |
99 |
</div> |
| 75 |
[% ELSE %] |
100 |
[% ELSE %] |
| 76 |
<div class="alert alert-info">No items found.</div> |
101 |
<div class="alert alert-info">No items found.</div> |
|
Lines 328-343
Link Here
|
| 328 |
</li> |
353 |
</li> |
| 329 |
<li> |
354 |
<li> |
| 330 |
<label for="ccodeslimit">Collection: </label> |
355 |
<label for="ccodeslimit">Collection: </label> |
| 331 |
<select name="ccodeslimit" id="ccodeslimit"> |
356 |
<select name="ccodeslimit" id="ccodeslimit" multiple="multiple"> |
| 332 |
<option value="">All</option> |
357 |
<option value="">All</option> |
| 333 |
[% PROCESS options_for_authorised_values authorised_values => AuthorisedValues.GetAuthValueDropbox( 'CCODE' ), selected_av => ccodeslimit %] |
358 |
[% PROCESS options_for_authorised_values_multiselect authorised_values => AuthorisedValues.GetAuthValueDropbox( 'CCODE' ), selected_av => ccodeslimit %] |
| 334 |
</select> |
359 |
</select> |
| 335 |
</li> |
360 |
</li> |
| 336 |
<li> |
361 |
<li> |
| 337 |
<label for="locationslimit">Shelving location: </label> |
362 |
<label for="locationslimit">Shelving location: </label> |
| 338 |
<select name="locationslimit" id="locationslimit"> |
363 |
<select name="locationslimit" id="locationslimit" multiple="multiple"> |
| 339 |
<option value="">All</option> |
364 |
<option value="">All</option> |
| 340 |
[% PROCESS options_for_authorised_values authorised_values => AuthorisedValues.GetAuthValueDropbox( 'LOC' ), selected_av => locationslimit %] |
365 |
[% PROCESS options_for_authorised_values_multiselect authorised_values => AuthorisedValues.GetAuthValueDropbox( 'LOC' ), selected_av => locationslimit %] |
| 341 |
</select> |
366 |
</select> |
| 342 |
</li> |
367 |
</li> |
| 343 |
</ol> |
368 |
</ol> |
|
Lines 352-361
Link Here
|
| 352 |
[% INCLUDE 'hold-group-modal.inc' %] |
377 |
[% INCLUDE 'hold-group-modal.inc' %] |
| 353 |
|
378 |
|
| 354 |
[% MACRO jsinclude BLOCK %] |
379 |
[% MACRO jsinclude BLOCK %] |
|
|
380 |
[% INCLUDE 'select2.inc' %] |
| 355 |
[% INCLUDE 'datatables.inc' %] |
381 |
[% INCLUDE 'datatables.inc' %] |
| 356 |
[% Asset.js("js/hold-group.js") | $raw %] |
382 |
[% Asset.js("js/hold-group.js") | $raw %] |
| 357 |
<script> |
383 |
<script> |
| 358 |
$(document).ready(function() { |
384 |
$(document).ready(function() { |
|
|
385 |
// Apply select2 to all select fields having a "multiple" attribute |
| 386 |
let selectFields = document.querySelectorAll('select[multiple]'); |
| 387 |
selectFields.forEach((selectField) => { |
| 388 |
$(selectField).select2({ |
| 389 |
width: "100%", |
| 390 |
allowClear: true, |
| 391 |
}); |
| 392 |
}); |
| 359 |
var holdst; |
393 |
var holdst; |
| 360 |
|
394 |
|
| 361 |
// Setup filters before DataTables initialisation, in case some columns are |
395 |
// Setup filters before DataTables initialisation, in case some columns are |
| 362 |
- |
|
|