|
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 324-339
Link Here
|
| 324 |
</li> |
349 |
</li> |
| 325 |
<li> |
350 |
<li> |
| 326 |
<label for="ccodeslimit">Collection: </label> |
351 |
<label for="ccodeslimit">Collection: </label> |
| 327 |
<select name="ccodeslimit" id="ccodeslimit"> |
352 |
<select name="ccodeslimit" id="ccodeslimit" multiple="multiple"> |
| 328 |
<option value="">All</option> |
353 |
<option value="">All</option> |
| 329 |
[% PROCESS options_for_authorised_values authorised_values => AuthorisedValues.GetAuthValueDropbox( 'CCODE' ), selected_av => ccodeslimit %] |
354 |
[% PROCESS options_for_authorised_values_multiselect authorised_values => AuthorisedValues.GetAuthValueDropbox( 'CCODE' ), selected_av => ccodeslimit %] |
| 330 |
</select> |
355 |
</select> |
| 331 |
</li> |
356 |
</li> |
| 332 |
<li> |
357 |
<li> |
| 333 |
<label for="locationslimit">Shelving location: </label> |
358 |
<label for="locationslimit">Shelving location: </label> |
| 334 |
<select name="locationslimit" id="locationslimit"> |
359 |
<select name="locationslimit" id="locationslimit" multiple="multiple"> |
| 335 |
<option value="">All</option> |
360 |
<option value="">All</option> |
| 336 |
[% PROCESS options_for_authorised_values authorised_values => AuthorisedValues.GetAuthValueDropbox( 'LOC' ), selected_av => locationslimit %] |
361 |
[% PROCESS options_for_authorised_values_multiselect authorised_values => AuthorisedValues.GetAuthValueDropbox( 'LOC' ), selected_av => locationslimit %] |
| 337 |
</select> |
362 |
</select> |
| 338 |
</li> |
363 |
</li> |
| 339 |
</ol> |
364 |
</ol> |
|
Lines 346-354
Link Here
|
| 346 |
[% END %] |
371 |
[% END %] |
| 347 |
|
372 |
|
| 348 |
[% MACRO jsinclude BLOCK %] |
373 |
[% MACRO jsinclude BLOCK %] |
|
|
374 |
[% INCLUDE 'select2.inc' %] |
| 349 |
[% INCLUDE 'datatables.inc' %] |
375 |
[% INCLUDE 'datatables.inc' %] |
| 350 |
<script> |
376 |
<script> |
| 351 |
$(document).ready(function() { |
377 |
$(document).ready(function() { |
|
|
378 |
// Apply select2 to all select fields having a "multiple" attribute |
| 379 |
let selectFields = document.querySelectorAll('select[multiple]'); |
| 380 |
selectFields.forEach((selectField) => { |
| 381 |
$(selectField).select2({ |
| 382 |
width: "100%", |
| 383 |
allowClear: true, |
| 384 |
}); |
| 385 |
}); |
| 352 |
var holdst; |
386 |
var holdst; |
| 353 |
|
387 |
|
| 354 |
// Setup filters before DataTables initialisation, in case some columns are |
388 |
// Setup filters before DataTables initialisation, in case some columns are |
| 355 |
- |
|
|