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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc (-27 / +41 lines)
Lines 3-34 Link Here
3
[% USE AuthorisedValues %]
3
[% USE AuthorisedValues %]
4
[% USE raw %]
4
[% USE raw %]
5
5
6
[% BLOCK items_table %]
6
[% BLOCK build_table %]
7
    <div class="[% tab | html %]_table_table_controls">
8
        [% IF (StaffDetailItemSelection) %]
9
10
            <span class="show_hide_filters">
11
                <a href="#" class="show_filters" data-tab="[% tab | html %]"><i class="fa fa-filter"></i> Show filters</a>
12
                <a href="#" class="hide_filters" data-tab="[% tab | html %]" style="display: none;"><i class="fa fa-filter"></i> Hide filters</a>
13
            </span>
14
            | <a href="#" class="SelectAll" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</a>
15
            | <a href="#" class="ClearAll" data-tab="[% tab | html %]"><i class="fa fa-times"></i> Clear all</a>
16
            <span class="itemselection_actions">
17
              | Actions:
18
              [% IF CAN_user_tools_items_batchdel %]
19
                <a class="itemselection_action_delete"><i class="fa fa-trash-can"></i> Delete selected items</a>
20
              [% END %]
21
              [% IF CAN_user_tools_items_batchmod %]
22
                <a class="itemselection_action_modify"><i class="fa-solid fa-pencil"></i> Modify selected items</a>
23
              [% END %]
24
              [% IF CAN_user_editcatalogue_manage_item_groups && biblio.item_groups.count %]
25
                <a class="itemselection_action_item_group_set" href="#"><i class="fa fa-book"></i> Add/move to item group</a>
26
                <a class="itemselection_action_item_group_unset" href="#"><i class="fa fa-unlink"></i> Remove from item group</a>
27
              [% END %]
28
            </span>
29
        [% END %]
30
    </div>
31
32
    <table class="items_table" id="[% tab | html %]_table">
7
    <table class="items_table" id="[% tab | html %]_table">
33
        <thead>
8
        <thead>
34
            [% IF (StaffDetailItemSelection) %]<th id="[% tab | html %]_checkbox" data-colname="[% tab | html %]_checkbox" class="NoSort"></th>[% END %]
9
            [% IF (StaffDetailItemSelection) %]<th id="[% tab | html %]_checkbox" data-colname="[% tab | html %]_checkbox" class="NoSort"></th>[% END %]
Lines 65-70 Link Here
65
            </tr>
40
            </tr>
66
        </thead>
41
        </thead>
67
    </table>
42
    </table>
43
[% END %]
44
[% BLOCK items_table %]
45
    <div class="[% tab | html %]_table_table_controls">
46
        [% IF (StaffDetailItemSelection) %]
47
48
            <span class="show_hide_filters">
49
                <a href="#" class="show_filters" data-tab="[% tab | html %]"><i class="fa fa-filter"></i> Show filters</a>
50
                <a href="#" class="hide_filters" data-tab="[% tab | html %]" style="display: none;"><i class="fa fa-filter"></i> Hide filters</a>
51
            </span>
52
            | <a href="#" class="SelectAll" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</a>
53
            | <a href="#" class="ClearAll" data-tab="[% tab | html %]"><i class="fa fa-times"></i> Clear all</a>
54
            <span class="itemselection_actions">
55
              | Actions:
56
              [% IF CAN_user_tools_items_batchdel %]
57
                <a class="itemselection_action_delete"><i class="fa fa-trash-can"></i> Delete selected items</a>
58
              [% END %]
59
              [% IF CAN_user_tools_items_batchmod %]
60
                <a class="itemselection_action_modify"><i class="fa-solid fa-pencil"></i> Modify selected items</a>
61
              [% END %]
62
              [% IF CAN_user_editcatalogue_manage_item_groups && biblio.item_groups.count %]
63
                <a class="itemselection_action_item_group_set" href="#"><i class="fa fa-book"></i> Add/move to item group</a>
64
                <a class="itemselection_action_item_group_unset" href="#"><i class="fa fa-unlink"></i> Remove from item group</a>
65
              [% END %]
66
            </span>
67
        [% END %]
68
    </div>
69
70
    [% PROCESS build_table tab => tab %]
68
[% END %][%# end of block items_table %]
71
[% END %][%# end of block items_table %]
69
72
70
73
Lines 211-218 Link Here
211
        otherholdings: [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json')  | $raw %],
214
        otherholdings: [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json')  | $raw %],
212
    };
215
    };
213
216
217
    let table_nodes = {
218
        holdings: '[% PROCESS 'build_table' tab="holdings" | collapse %]',
219
        otherholdings: '[% PROCESS 'build_table' tab="otherholdings" | collapse %]',
220
    };
214
    function build_items_table (tab_id, add_filters, dt_options) {
221
    function build_items_table (tab_id, add_filters, dt_options) {
215
222
223
        if ( dt_options && dt_options.hasOwnProperty('destroy') ) {
224
            let table_id = "#"+tab_id+"_table";
225
            if( $.fn.dataTable.isDataTable(table_id) ) {
226
                $(table_id).DataTable().destroy();
227
            }
228
            $(table_id).replaceWith(table_nodes[tab_id]);
229
            dt_options['destroy'] = null;
230
        }
216
        let default_filters = {};
231
        let default_filters = {};
217
        [% IF Koha.Preference('SeparateHoldings') %]
232
        [% IF Koha.Preference('SeparateHoldings') %]
218
            [% SET SeparateHoldingsBranch = Koha.Preference('SeparateHoldingsBranch') || 'homebranch' %];
233
            [% SET SeparateHoldingsBranch = Koha.Preference('SeparateHoldingsBranch') || 'homebranch' %];
219
- 

Return to bug 33568