Lines 554-560
Link Here
|
554 |
[% ELSE # /IF scan %] |
554 |
[% ELSE # /IF scan %] |
555 |
<div id="searchresults"> |
555 |
<div id="searchresults"> |
556 |
[% INCLUDE 'page-numbers.inc' %] |
556 |
[% INCLUDE 'page-numbers.inc' %] |
557 |
|
557 |
<button href="#" id="toggleitems" class="btn btn-primary btn-xs" style="float: right;">Show local items only</button> |
558 |
<form action="/cgi-bin/koha/catalogue/search.pl" method="get" name="bookbag_form" id="bookbag_form"> |
558 |
<form action="/cgi-bin/koha/catalogue/search.pl" method="get" name="bookbag_form" id="bookbag_form"> |
559 |
[% IF ( searchdesc ) %] |
559 |
[% IF ( searchdesc ) %] |
560 |
[% FOREACH QUERY_INPUT IN QUERY_INPUTS %] |
560 |
[% FOREACH QUERY_INPUT IN QUERY_INPUTS %] |
Lines 747-763
Link Here
|
747 |
<div class="results_available_count"> |
747 |
<div class="results_available_count"> |
748 |
[% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %] |
748 |
[% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %] |
749 |
<span class="blocker inaccurate-item-statuses" title="Item statuses may be inaccurate. Please view the record details for accurate item statuses"> |
749 |
<span class="blocker inaccurate-item-statuses" title="Item statuses may be inaccurate. Please view the record details for accurate item statuses"> |
|
|
750 |
<div class="all"> |
751 |
[% tnx('{count} item', '{count} items', SEARCH_RESULT.items_count, {count = SEARCH_RESULT.items_count}) | html %][% IF ( SEARCH_RESULT.availablecount ) %] |
752 |
, [% SEARCH_RESULT.availablecount | html %] <span>available:</span> |
753 |
[% ELSE %] |
754 |
, <span>None available</span> |
755 |
[% END %] |
756 |
</div> |
757 |
[% IF SEARCH_RESULT.branchtotalcount > 0 %] |
758 |
<div class="branch_specific"> |
759 |
[% tnx('{count} item', '{count} items', SEARCH_RESULT.branchtotalcount, {count = SEARCH_RESULT.branchtotalcount}) | html %][% IF ( SEARCH_RESULT.branchavailablecount ) %] |
760 |
, [% SEARCH_RESULT.branchavailablecount | html %] <span>available:</span> |
761 |
[% ELSE %] |
762 |
, <span>None available</span> |
763 |
[% END %] |
764 |
</div> |
765 |
[% END %] |
766 |
</span> |
767 |
[% ELSE %] |
768 |
<div class="all"> |
750 |
[% tnx('{count} item', '{count} items', SEARCH_RESULT.items_count, {count = SEARCH_RESULT.items_count}) | html %][% IF ( SEARCH_RESULT.availablecount ) %] |
769 |
[% tnx('{count} item', '{count} items', SEARCH_RESULT.items_count, {count = SEARCH_RESULT.items_count}) | html %][% IF ( SEARCH_RESULT.availablecount ) %] |
751 |
, [% SEARCH_RESULT.availablecount | html %] <span>available:</span> |
770 |
, [% SEARCH_RESULT.availablecount | html %] <span>available:</span> |
752 |
[% ELSE %] |
771 |
[% ELSE %] |
753 |
, <span>None available</span> |
772 |
, <span>None available</span> |
754 |
[% END %] |
773 |
[% END %] |
755 |
</span> |
774 |
</div> |
756 |
[% ELSE %] |
775 |
[% IF SEARCH_RESULT.branchtotalcount > 0 %] |
757 |
[% tnx('{count} item', '{count} items', SEARCH_RESULT.items_count, {count = SEARCH_RESULT.items_count}) | html %][% IF ( SEARCH_RESULT.availablecount ) %] |
776 |
<div class="branch_specific"> |
758 |
, [% SEARCH_RESULT.availablecount | html %] <span>available:</span> |
777 |
[% tnx('{count} item', '{count} items', SEARCH_RESULT.branchtotalcount, {count = SEARCH_RESULT.branchtotalcount}) | html %][% IF ( SEARCH_RESULT.branchavailablecount ) %] |
759 |
[% ELSE %] |
778 |
, [% SEARCH_RESULT.branchavailablecount | html %] <span>available:</span> |
760 |
, <span>None available</span> |
779 |
[% ELSE %] |
|
|
780 |
, <span>None available</span> |
781 |
[% END %] |
782 |
</div> |
761 |
[% END %] |
783 |
[% END %] |
762 |
[% END %] |
784 |
[% END %] |
763 |
</div> |
785 |
</div> |
Lines 766-776
Link Here
|
766 |
[% BLOCK search_result_items %] |
788 |
[% BLOCK search_result_items %] |
767 |
[% IF status_count == "onloancount" %] |
789 |
[% IF status_count == "onloancount" %] |
768 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
790 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
769 |
<div class="results_checkedout">[% SEARCH_RESULT.${status_count} | html %] checked out:</div> |
791 |
<div class="results_checkedout all">[% SEARCH_RESULT.${status_count} | html %] checked out:</div> |
|
|
792 |
<div class="results_checkedout branch_specific">[% SEARCH_RESULT.branchonloancount | html %] checked out:</div> |
770 |
[% END %] |
793 |
[% END %] |
771 |
[% ELSIF status_count == "othercount" %] |
794 |
[% ELSIF status_count == "othercount" %] |
772 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
795 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
773 |
<div class="results_unavailable">[% SEARCH_RESULT.${status_count} | html %] unavailable:</div> |
796 |
<div class="results_unavailable all">[% SEARCH_RESULT.${status_count} | html %] unavailable:</div> |
|
|
797 |
<div class="results_unavailable branch_specific">[% SEARCH_RESULT.branchothercount | html %] unavailable:</div> |
774 |
[% END %] |
798 |
[% END %] |
775 |
[% END %] |
799 |
[% END %] |
776 |
[% IF SEARCH_RESULT.${items_loop}.size > 0 %] |
800 |
[% IF SEARCH_RESULT.${items_loop}.size > 0 %] |
Lines 848-856
Link Here
|
848 |
[% END %] |
872 |
[% END %] |
849 |
</ul> |
873 |
</ul> |
850 |
[% ELSE %] |
874 |
[% ELSE %] |
851 |
<span class="unavailable">No items</span> |
875 |
<span class="unavailable all">No items</span> |
852 |
[% END %] |
876 |
[% END %] |
853 |
[% END # /IF ( SEARCH_RESULT.items_count ) %] |
877 |
[% END # /IF ( SEARCH_RESULT.items_count ) %] |
|
|
878 |
[% IF SEARCH_RESULT.branchtotalcount == 0 %] |
879 |
<span class="unavailable branch_specific">No items</span> |
880 |
[% END %] |
854 |
</div> |
881 |
</div> |
855 |
<!-- /.availability --> |
882 |
<!-- /.availability --> |
856 |
</td> |
883 |
</td> |
Lines 935-940
Link Here
|
935 |
var biblionumber = "[% biblionumber | html %]"; |
962 |
var biblionumber = "[% biblionumber | html %]"; |
936 |
var holdfor_cardnumber = "[% holdfor_patron.cardnumber | html %]"; |
963 |
var holdfor_cardnumber = "[% holdfor_patron.cardnumber | html %]"; |
937 |
var holdforclub = "[% holdforclub | html %]"; |
964 |
var holdforclub = "[% holdforclub | html %]"; |
|
|
965 |
var userbranch = "[% userbranch | html %]"; |
966 |
$('#toggleitems').click( function() { |
967 |
$('#toggleitems').text() === 'Show local items only' ? $('#toggleitems').text("Show items in all libraries") : $('#toggleitems').text("Show local items only"); |
968 |
$('.branch_specific').toggle(); |
969 |
$('.all').toggle(); |
970 |
$('ul[class*="_loop_items"] li').each( function() { |
971 |
if ( !$(this).hasClass(userbranch) ) { |
972 |
$(this).toggle(); |
973 |
} |
974 |
}); |
975 |
}); |
938 |
[% IF SEARCH_RESULTS %] |
976 |
[% IF SEARCH_RESULTS %] |
939 |
var SEARCH_RESULTS = 1; |
977 |
var SEARCH_RESULTS = 1; |
940 |
[% ELSE %] |
978 |
[% ELSE %] |
941 |
- |
|
|