Lines 447-453
Link Here
|
447 |
|
447 |
|
448 |
<div id="searchresults"> |
448 |
<div id="searchresults"> |
449 |
[% INCLUDE 'page-numbers.inc' %] |
449 |
[% INCLUDE 'page-numbers.inc' %] |
450 |
<button href="#" id="toggleitems" class="btn btn-primary btn-xs" style="float: right;">Show local items only</button> |
450 |
[% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
|
|
451 |
<button href="#" id="toggleitems" class="btn btn-primary btn-xs" style="float: right;">Show local items only</button> |
452 |
[% END %] |
451 |
<form action="/cgi-bin/koha/catalogue/search.pl" method="get" name="bookbag_form" id="bookbag_form"> |
453 |
<form action="/cgi-bin/koha/catalogue/search.pl" method="get" name="bookbag_form" id="bookbag_form"> |
452 |
[% IF ( searchdesc ) %] |
454 |
[% IF ( searchdesc ) %] |
453 |
[% FOREACH QUERY_INPUT IN QUERY_INPUTS %] |
455 |
[% FOREACH QUERY_INPUT IN QUERY_INPUTS %] |
Lines 608-614
Link Here
|
608 |
[% END %] |
610 |
[% END %] |
609 |
|
611 |
|
610 |
<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> |
612 |
<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> |
611 |
[% IF SEARCH_RESULT.branchtotalcount > 0 %] |
613 |
[% IF ( SEARCH_RESULT.branchtotalcount > 0 ) && Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
612 |
<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> |
614 |
<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> |
613 |
[% END %] |
615 |
[% END %] |
614 |
|
616 |
|
Lines 623-634
Link Here
|
623 |
[% IF status_count == "onloancount" %] |
625 |
[% IF status_count == "onloancount" %] |
624 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
626 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
625 |
<div class="results_checkedout all">[% SEARCH_RESULT.${status_count} | html %] checked out:</div> |
627 |
<div class="results_checkedout all">[% SEARCH_RESULT.${status_count} | html %] checked out:</div> |
626 |
<div class="results_checkedout branch_specific">[% SEARCH_RESULT.branchonloancount | html %] checked out:</div> |
628 |
[% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
|
|
629 |
<div class="results_checkedout branch_specific">[% SEARCH_RESULT.branchonloancount | html %] checked out:</div> |
630 |
[% END %] |
627 |
[% END %] |
631 |
[% END %] |
628 |
[% ELSIF status_count == "othercount" %] |
632 |
[% ELSIF status_count == "othercount" %] |
629 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
633 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
630 |
<div class="results_unavailablei all">[% SEARCH_RESULT.${status_count} | html %] unavailable:</div> |
634 |
<div class="results_unavailablei all">[% SEARCH_RESULT.${status_count} | html %] unavailable:</div> |
631 |
<div class="results_unavailablei branch_specific">[% SEARCH_RESULT.branchothercount | html %] unavailable:</div> |
635 |
[% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
|
|
636 |
<div class="results_unavailablei branch_specific">[% SEARCH_RESULT.branchothercount | html %] unavailable:</div> |
637 |
[% END %] |
632 |
[% END %] |
638 |
[% END %] |
633 |
[% END %] |
639 |
[% END %] |
634 |
[% IF SEARCH_RESULT.${items_loop}.size > 0 %] |
640 |
[% IF SEARCH_RESULT.${items_loop}.size > 0 %] |
Lines 711-717
Link Here
|
711 |
<span class="unavailable all">No items</span> |
717 |
<span class="unavailable all">No items</span> |
712 |
[% END %] |
718 |
[% END %] |
713 |
[% END # /IF ( SEARCH_RESULT.items_count ) %] |
719 |
[% END # /IF ( SEARCH_RESULT.items_count ) %] |
714 |
[% IF SEARCH_RESULT.branchtotalcount == 0 %] |
720 |
[% IF SEARCH_RESULT.branchtotalcount == 0 && Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
715 |
<span class="unavailable branch_specific">No items</span> |
721 |
<span class="unavailable branch_specific">No items</span> |
716 |
[% END %] |
722 |
[% END %] |
717 |
</div> <!-- /.availability --> |
723 |
</div> <!-- /.availability --> |
Lines 799-814
Link Here
|
799 |
var holdforclub = "[% holdforclub | html %]"; |
805 |
var holdforclub = "[% holdforclub | html %]"; |
800 |
var userbranch = "[% userbranch | html %]"; |
806 |
var userbranch = "[% userbranch | html %]"; |
801 |
|
807 |
|
802 |
$('#toggleitems').click( function() { |
808 |
[% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
803 |
$('#toggleitems').text() === 'Show local items only' ? $('#toggleitems').text("Show items in all libraries") : $('#toggleitems').text("Show local items only"); |
809 |
$('#toggleitems').click( function() { |
804 |
$('.branch_specific').toggle(); |
810 |
$('#toggleitems').text() === 'Show local items only' ? $('#toggleitems').text("Show items in all libraries") : $('#toggleitems').text("Show local items only"); |
805 |
$('.all').toggle(); |
811 |
$('.branch_specific').toggle(); |
806 |
$('ul[class*="_loop_items"] li').each( function() { |
812 |
$('.all').toggle(); |
807 |
if ( !$(this).hasClass(userbranch) ) { |
813 |
$('ul[class*="_loop_items"] li').each( function() { |
808 |
$(this).toggle(); |
814 |
if ( !$(this).hasClass(userbranch) ) { |
809 |
} |
815 |
$(this).toggle(); |
|
|
816 |
} |
817 |
}); |
810 |
}); |
818 |
}); |
811 |
}); |
819 |
[% END %] |
812 |
[% IF SEARCH_RESULTS %] |
820 |
[% IF SEARCH_RESULTS %] |
813 |
var SEARCH_RESULTS = 1; |
821 |
var SEARCH_RESULTS = 1; |
814 |
[% ELSE %] |
822 |
[% ELSE %] |
815 |
- |
|
|