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

(-)a/circ/pendingreserves.pl (-2 / +8 lines)
Lines 229-235 my $all_holds = { Link Here
229
    map { $_->biblionumber => $_ } @{ Koha::Holds->search(
229
    map { $_->biblionumber => $_ } @{ Koha::Holds->search(
230
            { reserve_id => [ values %$holds_biblios_map ]},
230
            { reserve_id => [ values %$holds_biblios_map ]},
231
            {
231
            {
232
                prefetch => [ 'borrowernumber', 'itembib', 'biblio' ],
232
                prefetch => [ 'borrowernumber', 'itembib', 'biblio', 'item_group' ],
233
            }
233
            }
234
        )->as_list
234
        )->as_list
235
    }
235
    }
Lines 265-270 foreach my $bibnum ( @biblionumbers ){ Link Here
265
    }
265
    }
266
    $hold_info->{itemtypes} = \@res_itemtypes;
266
    $hold_info->{itemtypes} = \@res_itemtypes;
267
267
268
    my $res_info = $all_holds->{$bibnum};
269
268
    # get available values for each biblio
270
    # get available values for each biblio
269
    my $fields = {
271
    my $fields = {
270
        locations       => 'location',
272
        locations       => 'location',
Lines 282-287 foreach my $bibnum ( @biblionumbers ){ Link Here
282
          [ uniq map { defined $_->$field ? $_->$field : () } @$items ];
284
          [ uniq map { defined $_->$field ? $_->$field : () } @$items ];
283
    }
285
    }
284
286
287
    if ( $res_info->item_group ) {
288
       $hold_info->{barcodes} = [ uniq map { defined $_->barcode && $_->item_group->id == $res_info->item_group_id  ? $_->barcode : () } @$items ];
289
    }
290
285
    # items available
291
    # items available
286
    $hold_info->{items_count} = $items_count;
292
    $hold_info->{items_count} = $items_count;
287
293
Lines 292-302 foreach my $bibnum ( @biblionumbers ){ Link Here
292
    $hold_info->{pull_count} = $pull_count;
298
    $hold_info->{pull_count} = $pull_count;
293
299
294
    # get other relevant information
300
    # get other relevant information
295
    my $res_info = $all_holds->{$bibnum};
296
    $hold_info->{patron} = $res_info->patron;
301
    $hold_info->{patron} = $res_info->patron;
297
    $hold_info->{item}   = $res_info->item;
302
    $hold_info->{item}   = $res_info->item;
298
    $hold_info->{biblio} = $res_info->biblio;
303
    $hold_info->{biblio} = $res_info->biblio;
299
    $hold_info->{hold}   = $res_info;
304
    $hold_info->{hold}   = $res_info;
305
    $hold_info->{item_group} = $res_info->item_group;
300
306
301
    push @holds_info, $hold_info;
307
    push @holds_info, $hold_info;
302
}
308
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt (-2 / +11 lines)
Lines 129-135 Link Here
129
        <td>
129
        <td>
130
            [% IF ( hold_info.barcodes.size ) %]
130
            [% IF ( hold_info.barcodes.size ) %]
131
                [% SET barcode = hold_info.barcodes.first %]
131
                [% SET barcode = hold_info.barcodes.first %]
132
                [% IF ( hold_info.item ) %]<span>Only [% barcode | html %]</span>[% ELSE %]<span>[% barcode | html %] or any available.</span>[% END %]
132
                [% IF ( hold_info.item ) %]
133
                    <span>Only [% barcode | html %]</span>
134
                [% ELSE %]
135
                    <span>[% barcode | html %] or
136
                        [% IF hold_info.item_group %]
137
                            any available from item group <em>[% hold_info.item_group.description | html %]</em>.
138
                        [% ELSE %]
139
                            any available.
140
                        [% END %]
141
                    </span>
142
                [% END %]
133
            [% END %]
143
            [% END %]
134
        </td>
144
        </td>
135
        <td>
145
        <td>
136
- 

Return to bug 24860