|
Lines 555-561
Link Here
|
| 555 |
<div id="searchresults"> |
555 |
<div id="searchresults"> |
| 556 |
[% INCLUDE 'page-numbers.inc' %] |
556 |
[% INCLUDE 'page-numbers.inc' %] |
| 557 |
[% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
557 |
[% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
| 558 |
<button href="#" id="toggleitems" class="btn btn-primary btn-xs" style="float: right;">Show local items only</button> |
558 |
<button href="#" id="toggleitems" class="btn btn-primary btn-xs show-local-items" style="float: right;">Show local items only</button> |
| 559 |
[% END %] |
559 |
[% END %] |
| 560 |
<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"> |
| 561 |
[% IF ( searchdesc ) %] |
561 |
[% IF ( searchdesc ) %] |
|
Lines 970-975
Link Here
|
| 970 |
var holdforclub = "[% holdforclub | html %]"; |
970 |
var holdforclub = "[% holdforclub | html %]"; |
| 971 |
var userbranch = "[% userbranch | html %]"; |
971 |
var userbranch = "[% userbranch | html %]"; |
| 972 |
[% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
972 |
[% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] |
|
|
973 |
$(document).ready( function() { |
| 974 |
if (localStorage.getItem("show_local_items") === 'local') { |
| 975 |
$('#toggleitems').click(); |
| 976 |
} |
| 977 |
}); |
| 973 |
$('#toggleitems').click( function() { |
978 |
$('#toggleitems').click( function() { |
| 974 |
$('#toggleitems').text() === 'Show local items only' ? $('#toggleitems').text("Show items in all libraries") : $('#toggleitems').text("Show local items only"); |
979 |
$('#toggleitems').text() === 'Show local items only' ? $('#toggleitems').text("Show items in all libraries") : $('#toggleitems').text("Show local items only"); |
| 975 |
$('.branch_specific').toggle(); |
980 |
$('.branch_specific').toggle(); |
|
Lines 979-984
Link Here
|
| 979 |
$(this).toggle(); |
984 |
$(this).toggle(); |
| 980 |
} |
985 |
} |
| 981 |
}); |
986 |
}); |
|
|
987 |
$(this).toggleClass('show-local-items show-all-items'); |
| 988 |
if ($(this).hasClass('show-local-items')) { |
| 989 |
localStorage.setItem("show_local_items", 'all'); |
| 990 |
} else { |
| 991 |
localStorage.setItem("show_local_items", 'local'); |
| 992 |
} |
| 982 |
}); |
993 |
}); |
| 983 |
[% END %] |
994 |
[% END %] |
| 984 |
[% IF SEARCH_RESULTS %] |
995 |
[% IF SEARCH_RESULTS %] |