@@ -, +, @@ StaffDetailItemSelection is off --- .../tables/items/catalogue_detail.inc | 56 ++++++++++--------- 1 file changed, 31 insertions(+), 25 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -46,12 +46,11 @@ [% END %] [% BLOCK items_table %]
+ + Show filters + + [% IF (StaffDetailItemSelection) %] - - - Show filters - - | Select all | Clear all @@ -142,30 +141,37 @@ itemSelectionBuildActionLinks(tab_id); }); - $(".show_filters").on("click",function(e){ - e.preventDefault(); - let tab_id = $(this).data("tab"); - let tab = $("#"+tab_id); - tab.find(".show_filters").hide(); - tab.find(".hide_filters").show(); - $("#"+tab_id+"_table thead tr:eq(1)").remove(); - build_items_table(tab_id, true, { destroy: true }, build_items_table_drawncallback ); - itemSelectionBuildActionLinks(tab_id); - }); + }); + [% END %] - $(".hide_filters").on("click",function(e){ - e.preventDefault(); - let tab_id = $(this).data("tab"); - let tab = $("#"+tab_id); - tab.find(".hide_filters").hide(); - tab.find(".show_filters").show(); - $("#"+tab_id+"_table thead tr:eq(1)").remove(); - build_items_table(tab_id, false, { destroy: true }, build_items_table_drawncallback ); + + $(document).ready(function() { + $(".show_filters").on("click",function(e){ + e.preventDefault(); + let tab_id = $(this).data("tab"); + let tab = $("#"+tab_id); + tab.find(".show_filters").hide(); + tab.find(".hide_filters").show(); + $("#"+tab_id+"_table thead tr:eq(1)").remove(); + build_items_table(tab_id, true, { destroy: true }, build_items_table_drawncallback ); + [% IF StaffDetailItemSelection %] itemSelectionBuildActionLinks(tab_id); - }); + [% END %] }); - [% END %] + $(".hide_filters").on("click",function(e){ + e.preventDefault(); + let tab_id = $(this).data("tab"); + let tab = $("#"+tab_id); + tab.find(".hide_filters").hide(); + tab.find(".show_filters").show(); + $("#"+tab_id+"_table thead tr:eq(1)").remove(); + build_items_table(tab_id, false, { destroy: true }, build_items_table_drawncallback ); + [% IF StaffDetailItemSelection %] + itemSelectionBuildActionLinks(tab_id); + [% END %] + }); + }); const all_libraries = [% To.json(Branches.all) | $raw %]; const libraries_filters = all_libraries.map(e => { --