Lines 451-457
Link Here
|
451 |
|
451 |
|
452 |
<div id="searchresults"> |
452 |
<div id="searchresults"> |
453 |
[% INCLUDE 'page-numbers.inc' %] |
453 |
[% INCLUDE 'page-numbers.inc' %] |
454 |
|
454 |
<button href="#" id="toggleitems" class="btn btn-primary btn-xs" style="float: right;">Show local items only</button> |
455 |
<form action="/cgi-bin/koha/catalogue/search.pl" method="get" name="bookbag_form" id="bookbag_form"> |
455 |
<form action="/cgi-bin/koha/catalogue/search.pl" method="get" name="bookbag_form" id="bookbag_form"> |
456 |
[% IF ( searchdesc ) %] |
456 |
[% IF ( searchdesc ) %] |
457 |
[% FOREACH QUERY_INPUT IN QUERY_INPUTS %] |
457 |
[% FOREACH QUERY_INPUT IN QUERY_INPUTS %] |
Lines 611-617
Link Here
|
611 |
<span class="blocker inaccurate-item-statuses" title="Item statuses may be inaccurate. Please view the record details for accurate item statuses"> |
611 |
<span class="blocker inaccurate-item-statuses" title="Item statuses may be inaccurate. Please view the record details for accurate item statuses"> |
612 |
[% END %] |
612 |
[% END %] |
613 |
|
613 |
|
614 |
[% tnx('{count} item', '{count} items', SEARCH_RESULT.items_count, {count = SEARCH_RESULT.items_count}) | html %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount | html %] <span>available:</span>[% ELSE %], <span>None available</span>[% END %] |
614 |
<div class="all">[% tnx('{count} item', '{count} items', SEARCH_RESULT.items_count, {count = SEARCH_RESULT.items_count}) | html %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount | html %] <span>available:</span>[% ELSE %], <span>None available</span>[% END %]</div> |
|
|
615 |
[% IF SEARCH_RESULT.branchtotalcount > 0 %] |
616 |
<div class="branch_specific">[% tnx('{count} item', '{count} items', SEARCH_RESULT.branchtotalcount, {count = SEARCH_RESULT.branchtotalcount}) | html %][% IF ( SEARCH_RESULT.branchavailablecount ) %], [% SEARCH_RESULT.branchavailablecount | html %] <span>available:</span>[% ELSE %], <span>None available</span>[% END %]</div> |
617 |
[% END %] |
615 |
|
618 |
|
616 |
[% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %] |
619 |
[% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %] |
617 |
</span> |
620 |
</span> |
Lines 621-631
Link Here
|
621 |
[% BLOCK search_result_items %] |
624 |
[% BLOCK search_result_items %] |
622 |
[% IF status_count == "onloancount" %] |
625 |
[% IF status_count == "onloancount" %] |
623 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
626 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
624 |
<div class="results_checkedout">[% SEARCH_RESULT.${status_count} | html %] checked out:</div> |
627 |
<div class="results_checkedout all">[% SEARCH_RESULT.${status_count} | html %] checked out:</div> |
|
|
628 |
<div class="results_checkedout branch_specific">[% SEARCH_RESULT.branchonloancount | html %] checked out:</div> |
625 |
[% END %] |
629 |
[% END %] |
626 |
[% ELSIF status_count == "othercount" %] |
630 |
[% ELSIF status_count == "othercount" %] |
627 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
631 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
628 |
<div class="results_unavailable">[% SEARCH_RESULT.${status_count} | html %] unavailable:</div> |
632 |
<div class="results_unavailablei all">[% SEARCH_RESULT.${status_count} | html %] unavailable:</div> |
|
|
633 |
<div class="results_unavailablei branch_specific">[% SEARCH_RESULT.branchothercount | html %] unavailable:</div> |
629 |
[% END %] |
634 |
[% END %] |
630 |
[% END %] |
635 |
[% END %] |
631 |
[% IF SEARCH_RESULT.${items_loop}.size > 0 %] |
636 |
[% IF SEARCH_RESULT.${items_loop}.size > 0 %] |
Lines 704-712
Link Here
|
704 |
[% END %] |
709 |
[% END %] |
705 |
</ul> |
710 |
</ul> |
706 |
[% ELSE %] |
711 |
[% ELSE %] |
707 |
<span class="unavailable">No items</span> |
712 |
<span class="unavailable all">No items</span> |
708 |
[% END %] |
713 |
[% END %] |
709 |
[% END # /IF ( SEARCH_RESULT.items_count ) %] |
714 |
[% END # /IF ( SEARCH_RESULT.items_count ) %] |
|
|
715 |
[% IF SEARCH_RESULT.branchtotalcount == 0 %] |
716 |
<span class="unavailable branch_specific">No items</span> |
717 |
[% END %] |
710 |
</div> <!-- /.availability --> |
718 |
</div> <!-- /.availability --> |
711 |
</td> |
719 |
</td> |
712 |
</tr> |
720 |
</tr> |
Lines 816-821
Link Here
|
816 |
var biblionumber = "[% biblionumber | html %]"; |
824 |
var biblionumber = "[% biblionumber | html %]"; |
817 |
var holdfor_cardnumber = "[% holdfor_patron.cardnumber | html %]"; |
825 |
var holdfor_cardnumber = "[% holdfor_patron.cardnumber | html %]"; |
818 |
var holdforclub = "[% holdforclub | html %]"; |
826 |
var holdforclub = "[% holdforclub | html %]"; |
|
|
827 |
var userbranch = "[% userbranch | html %]"; |
828 |
|
829 |
$('#toggleitems').click( function() { |
830 |
$('#toggleitems').text() === 'Show local items only' ? $('#toggleitems').text("Show items in all libraries") : $('#toggleitems').text("Show local items only"); |
831 |
$('.branch_specific').toggle(); |
832 |
$('.all').toggle(); |
833 |
$('ul[class*="_loop_items"] li').each( function() { |
834 |
if ( !$(this).hasClass(userbranch) ) { |
835 |
$(this).toggle(); |
836 |
} |
837 |
}); |
838 |
}); |
819 |
[% IF SEARCH_RESULTS %] |
839 |
[% IF SEARCH_RESULTS %] |
820 |
var SEARCH_RESULTS = 1; |
840 |
var SEARCH_RESULTS = 1; |
821 |
[% ELSE %] |
841 |
[% ELSE %] |
822 |
- |
|
|