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 |
<button href="#" id="toggleitems" class="btn btn-primary btn-xs" style="float: right;">Show local items only</button> |
557 |
[% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
|
|
558 |
<button href="#" id="toggleitems" class="btn btn-primary btn-xs" style="float: right;">Show local items only</button> |
559 |
[% END %] |
558 |
<form action="/cgi-bin/koha/catalogue/search.pl" method="get" name="bookbag_form" id="bookbag_form"> |
560 |
<form action="/cgi-bin/koha/catalogue/search.pl" method="get" name="bookbag_form" id="bookbag_form"> |
559 |
[% IF ( searchdesc ) %] |
561 |
[% IF ( searchdesc ) %] |
560 |
[% FOREACH QUERY_INPUT IN QUERY_INPUTS %] |
562 |
[% FOREACH QUERY_INPUT IN QUERY_INPUTS %] |
Lines 754-760
Link Here
|
754 |
, <span>None available</span> |
756 |
, <span>None available</span> |
755 |
[% END %] |
757 |
[% END %] |
756 |
</div> |
758 |
</div> |
757 |
[% IF SEARCH_RESULT.branchtotalcount > 0 %] |
759 |
[% IF SEARCH_RESULT.branchtotalcount > 0 && Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
758 |
<div class="branch_specific"> |
760 |
<div class="branch_specific"> |
759 |
[% tnx('{count} item', '{count} items', SEARCH_RESULT.branchtotalcount, {count = SEARCH_RESULT.branchtotalcount}) | html %][% IF ( SEARCH_RESULT.branchavailablecount ) %] |
761 |
[% 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> |
762 |
, [% SEARCH_RESULT.branchavailablecount | html %] <span>available:</span> |
Lines 789-800
Link Here
|
789 |
[% IF status_count == "onloancount" %] |
791 |
[% IF status_count == "onloancount" %] |
790 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
792 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
791 |
<div class="results_checkedout all">[% SEARCH_RESULT.${status_count} | html %] checked out:</div> |
793 |
<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> |
794 |
[% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
|
|
795 |
<div class="results_checkedout branch_specific">[% SEARCH_RESULT.branchonloancount | html %] checked out:</div> |
796 |
[% END %] |
793 |
[% END %] |
797 |
[% END %] |
794 |
[% ELSIF status_count == "othercount" %] |
798 |
[% ELSIF status_count == "othercount" %] |
795 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
799 |
[% IF SEARCH_RESULT.${status_count} > 0 %] |
796 |
<div class="results_unavailable all">[% SEARCH_RESULT.${status_count} | html %] unavailable:</div> |
800 |
<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> |
801 |
[% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
|
|
802 |
<div class="results_unavailable branch_specific">[% SEARCH_RESULT.branchothercount | html %] unavailable:</div> |
803 |
[% END %] |
798 |
[% END %] |
804 |
[% END %] |
799 |
[% END %] |
805 |
[% END %] |
800 |
[% IF SEARCH_RESULT.${items_loop}.size > 0 %] |
806 |
[% IF SEARCH_RESULT.${items_loop}.size > 0 %] |
Lines 875-881
Link Here
|
875 |
<span class="unavailable all">No items</span> |
881 |
<span class="unavailable all">No items</span> |
876 |
[% END %] |
882 |
[% END %] |
877 |
[% END # /IF ( SEARCH_RESULT.items_count ) %] |
883 |
[% END # /IF ( SEARCH_RESULT.items_count ) %] |
878 |
[% IF SEARCH_RESULT.branchtotalcount == 0 %] |
884 |
[% IF SEARCH_RESULT.branchtotalcount == 0 && Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
879 |
<span class="unavailable branch_specific">No items</span> |
885 |
<span class="unavailable branch_specific">No items</span> |
880 |
[% END %] |
886 |
[% END %] |
881 |
</div> |
887 |
</div> |
Lines 963-978
Link Here
|
963 |
var holdfor_cardnumber = "[% holdfor_patron.cardnumber | html %]"; |
969 |
var holdfor_cardnumber = "[% holdfor_patron.cardnumber | html %]"; |
964 |
var holdforclub = "[% holdforclub | html %]"; |
970 |
var holdforclub = "[% holdforclub | html %]"; |
965 |
var userbranch = "[% userbranch | html %]"; |
971 |
var userbranch = "[% userbranch | html %]"; |
966 |
$('#toggleitems').click( function() { |
972 |
[% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
967 |
$('#toggleitems').text() === 'Show local items only' ? $('#toggleitems').text("Show items in all libraries") : $('#toggleitems').text("Show local items only"); |
973 |
$('#toggleitems').click( function() { |
968 |
$('.branch_specific').toggle(); |
974 |
$('#toggleitems').text() === 'Show local items only' ? $('#toggleitems').text("Show items in all libraries") : $('#toggleitems').text("Show local items only"); |
969 |
$('.all').toggle(); |
975 |
$('.branch_specific').toggle(); |
970 |
$('ul[class*="_loop_items"] li').each( function() { |
976 |
$('.all').toggle(); |
971 |
if ( !$(this).hasClass(userbranch) ) { |
977 |
$('ul[class*="_loop_items"] li').each( function() { |
972 |
$(this).toggle(); |
978 |
if ( !$(this).hasClass(userbranch) ) { |
973 |
} |
979 |
$(this).toggle(); |
|
|
980 |
} |
981 |
}); |
974 |
}); |
982 |
}); |
975 |
}); |
983 |
[% END %] |
976 |
[% IF SEARCH_RESULTS %] |
984 |
[% IF SEARCH_RESULTS %] |
977 |
var SEARCH_RESULTS = 1; |
985 |
var SEARCH_RESULTS = 1; |
978 |
[% ELSE %] |
986 |
[% ELSE %] |
979 |
- |
|
|