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

(-)a/Koha/Biblio/ItemGroup/Item.pm (+14 lines)
Lines 19-30 use Modern::Perl; Link Here
19
19
20
use base qw(Koha::Object);
20
use base qw(Koha::Object);
21
21
22
use Koha::Biblio::ItemGroup;
23
22
=head1 NAME
24
=head1 NAME
23
25
24
Koha::Biblio::ItemGroup::Item - Koha ItemGroup Item Object class
26
Koha::Biblio::ItemGroup::Item - Koha ItemGroup Item Object class
25
27
26
=head1 API
28
=head1 API
27
29
30
=head2 Class methods
31
32
=head3 item_group
33
34
=cut
35
36
sub item_group {
37
    my ($self) = @_;
38
    my $rs = $self->_result->item_group;
39
    return Koha::Biblio::ItemGroup->_new_from_dbic($rs);
40
}
41
28
=head2 Internal methods
42
=head2 Internal methods
29
43
30
=head3 _type
44
=head3 _type
(-)a/Koha/Item.pm (+8 lines)
Lines 465-470 sub item_group { Link Here
465
    return $item_group;
465
    return $item_group;
466
}
466
}
467
467
468
sub item_group_item {
469
    my ( $self ) = @_;
470
    my $rs = $self->_result->item_group_item;
471
    return unless $rs;
472
    return Koha::Biblio::ItemGroup::Item->_new_from_dbic($rs);
473
}
474
475
468
=head3 return_claims
476
=head3 return_claims
469
477
470
  my $return_claims = $item->return_claims;
478
  my $return_claims = $item->return_claims;
(-)a/api/v1/swagger/definitions/item.yaml (+4 lines)
Lines 234-239 properties: Link Here
234
    type:
234
    type:
235
      - array
235
      - array
236
      - "null"
236
      - "null"
237
  item_group_item:
238
    type:
239
      - object
240
      - "null"
237
  _strings:
241
  _strings:
238
    type:
242
    type:
239
      - object
243
      - object
(-)a/api/v1/swagger/paths/biblios.yaml (+1 lines)
Lines 424-429 Link Here
424
          enum:
424
          enum:
425
            - +strings
425
            - +strings
426
            - cover_image_ids
426
            - cover_image_ids
427
            - item_group_item.item_group.description
427
        collectionFormat: csv
428
        collectionFormat: csv
428
      - $ref: "../swagger.yaml#/parameters/match"
429
      - $ref: "../swagger.yaml#/parameters/match"
429
      - $ref: "../swagger.yaml#/parameters/order_by"
430
      - $ref: "../swagger.yaml#/parameters/order_by"
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-4 / +10 lines)
Lines 2495-2500 Link Here
2495
        [% IF Koha.Preference('LocalCoverImages') %]
2495
        [% IF Koha.Preference('LocalCoverImages') %]
2496
            embed.push('cover_image_ids');
2496
            embed.push('cover_image_ids');
2497
        [% END %]
2497
        [% END %]
2498
        [% IF Koha.Preference('EnableItemGroups') %]
2499
            embed.push('item_group_item.item_group.description');
2500
        [% END %]
2498
        let table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %];
2501
        let table_settings = [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %];
2499
        var items_table = $("#table_items").kohaTable({
2502
        var items_table = $("#table_items").kohaTable({
2500
            ajax: { url: table_url },
2503
            ajax: { url: table_url },
Lines 2605-2616 Link Here
2605
            },
2608
            },
2606
            [% IF Koha.Preference('EnableItemGroups') %]
2609
            [% IF Koha.Preference('EnableItemGroups') %]
2607
            {
2610
            {
2608
                data: "",
2611
                data: "item_group_item.item_group.description",
2609
                className: "item_group",
2612
                className: "item_group",
2610
                searchable: false, // FIXME
2613
                searchable: true,
2611
                orderable: true,
2614
                orderable: true,
2612
                render: function (data, type, row, meta) {
2615
                render: function (data, type, row, meta) {
2613
                    return "item.item_group.description";// FIXME item.item_group.description
2616
                    if ( row.item_group_item ) {
2617
                        return row.item_group_item.item_group.description;
2618
                    } else {
2619
                        return "";
2620
                    }
2614
                }
2621
                }
2615
            },
2622
            },
2616
            [% END %]
2623
            [% END %]
2617
- 

Return to bug 33568