View | Details | Raw Unified | Return to bug 33568
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-8 / +18 lines)
Lines 707-713 Link Here
707
                [% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %]
707
                [% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %]
708
                <th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th>
708
                <th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th>
709
                <th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th>
709
                <th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th>
710
                [% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %]
710
                <th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>
711
                [% IF Koha.Preference('EnableItemGroups') %]
711
                [% IF Koha.Preference('EnableItemGroups') %]
712
                    <th id="[% tab | html %]_item_group" data-colname="[% tab | html %]_item_group">Item group</th>
712
                    <th id="[% tab | html %]_item_group" data-colname="[% tab | html %]_item_group">Item group</th>
713
                [% END %]
713
                [% END %]
Lines 2238-2247 Link Here
2238
2238
2239
        });
2239
        });
2240
2240
2241
        function columnsInit(table) {
2242
            activate_filters(table.id, false);
2243
        }
2244
2245
        [% IF found1 && Koha.Preference('RetainCatalogSearchTerms') %]
2241
        [% IF found1 && Koha.Preference('RetainCatalogSearchTerms') %]
2246
            $(document).ready(function() {
2242
            $(document).ready(function() {
2247
                var search_index = localStorage.getItem("cat_search_pulldown_selection");
2243
                var search_index = localStorage.getItem("cat_search_pulldown_selection");
Lines 2499-2504 Link Here
2499
        [% IF Koha.Preference('LocalCoverImages') %]
2495
        [% IF Koha.Preference('LocalCoverImages') %]
2500
            embed.push('cover_image_ids');
2496
            embed.push('cover_image_ids');
2501
        [% END %]
2497
        [% END %]
2498
        let table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %];
2502
        var items_table = $("#table_items").kohaTable({
2499
        var items_table = $("#table_items").kohaTable({
2503
            ajax: { url: table_url },
2500
            ajax: { url: table_url },
2504
            order: [[ 0, "asc" ]],
2501
            order: [[ 0, "asc" ]],
Lines 2583-2589 Link Here
2583
                }
2580
                }
2584
                // FIXME Display the shelving location
2581
                // FIXME Display the shelving location
2585
            },
2582
            },
2586
            [% IF ( itemdata_ccode ) %]
2587
            {
2583
            {
2588
                data: "me.collection_code",
2584
                data: "me.collection_code",
2589
                searchable: true,
2585
                searchable: true,
Lines 2592-2598 Link Here
2592
                    return row._strings.collection_code.str;
2588
                    return row._strings.collection_code.str;
2593
                }
2589
                }
2594
            },
2590
            },
2595
            [% END %]
2596
            [% IF Koha.Preference('EnableItemGroups') %]
2591
            [% IF Koha.Preference('EnableItemGroups') %]
2597
            {
2592
            {
2598
                data: "",
2593
                data: "",
Lines 2806-2811 Link Here
2806
            }
2801
            }
2807
            [% END %]
2802
            [% END %]
2808
            ],
2803
            ],
2804
            initComplete: function( settings, json ){
2805
                let table = settings.oInstance.api();
2806
                table.columns().every(function(i){
2807
                    let is_empty = true;
2808
                    let nodes = this.nodes();
2809
                    nodes.each((td, ii) => {
2810
                        if ( $(td).html() !== '' ) {
2811
                            is_empty = false;
2812
                            return;
2813
                        }
2814
                    });
2815
                    if ( is_empty ) {
2816
                        table.columns(i).visible(false);
2817
                    }
2818
                });
2819
            },
2809
        });
2820
        });
2810
    </script>
2821
    </script>
2811
    [% CoverImagePlugins | $raw %]
2822
    [% CoverImagePlugins | $raw %]
2812
- 

Return to bug 33568