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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-22 / +17 lines)
Lines 2216-2237 Link Here
2216
2216
2217
        [% IF Koha.Preference('EnableItemGroups') %]
2217
        [% IF Koha.Preference('EnableItemGroups') %]
2218
            // Load item groups table
2218
            // Load item groups table
2219
            var itemGroupsTable = KohaTable("items-group-table", {
2219
            var itemGroupsTable = $("#items-group-table").kohaTable({
2220
                "autoWidth": false,
2220
                autoWidth: false,
2221
                "dom": '<"top pager"ilp>t<"bottom pager"ip>r',
2221
                dom: '<"top pager"ilp>t<"bottom pager"ip>r',
2222
                "columns": [
2222
                columns: [
2223
                    {
2223
                    {
2224
                        "data": function( oObj ) {
2224
                        data: "display_order",
2225
                            return oObj.display_order;
2225
                        title: _("Display order"),
2226
                        },
2226
                        searchable: true,
2227
                        orderable: true,
2227
                    },
2228
                    },
2228
                    {
2229
                    {
2229
                        "data": function( oObj ) {
2230
                        data: "description",
2230
                            return oObj.description;
2231
                        title: _("Description"),
2231
                        },
2232
                        searchable: true,
2233
                        orderable: true,
2232
                    },
2234
                    },
2233
                    {
2235
                    {
2234
                        "data": function( oObj ) {
2236
                        data: function( oObj ) {
2235
                            [% IF CAN_user_editcatalogue_manage_item_groups %]
2237
                            [% IF CAN_user_editcatalogue_manage_item_groups %]
2236
                                return `<button class='item-group-edit btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
2238
                                return `<button class='item-group-edit btn btn-default btn-xs' data-item-group-id='${oObj.item_group_id}'>
2237
                                    <i class="fa-solid fa-pencil" aria-hidden="true"></i> ${_("Edit")}
2239
                                    <i class="fa-solid fa-pencil" aria-hidden="true"></i> ${_("Edit")}
Lines 2244-2261 Link Here
2244
                                return "";
2246
                                return "";
2245
                            [% END %]
2247
                            [% END %]
2246
                        },
2248
                        },
2249
                        searchable: false,
2250
                        orderable: false,
2247
                    },
2251
                    },
2248
                ],
2252
                ],
2249
                "paginate": false,
2253
                paginate: false,
2250
                "processing": true,
2254
                ajax: { url: `/api/v1/biblios/${biblionumber}/item_groups?_per_page=-1` },
2251
                "serverSide":  false,
2252
                "ajax":  `/api/v1/biblios/${biblionumber}/item_groups?_per_page=-1`,
2253
                "sAjaxDataProp": "",
2254
                "fnServerData": function ( sSource, aoData, fnCallback ) {
2255
                    $.getJSON( sSource, aoData, function (json) {
2256
                        fnCallback(json)
2257
                    } );
2258
                },
2259
            });
2255
            });
2260
2256
2261
            // Create new item groups
2257
            // Create new item groups
2262
- 

Return to bug 34913