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

(-)a/catalogue/detail.pl (-2 / +13 lines)
Lines 190-195 my $norequests = 1; Link Here
190
my $authvalcode_items_itemlost = GetAuthValCode('items.itemlost',$fw);
190
my $authvalcode_items_itemlost = GetAuthValCode('items.itemlost',$fw);
191
my $authvalcode_items_damaged  = GetAuthValCode('items.damaged', $fw);
191
my $authvalcode_items_damaged  = GetAuthValCode('items.damaged', $fw);
192
192
193
my $materials_authvalcode = GetAuthValCode('items.materials', $fw);
194
my %materials_map;
195
my $materials_authvals = GetAuthorisedValues($materials_authvalcode);
196
if ($materials_authvals) {
197
    foreach my $value (@$materials_authvals) {
198
        $materials_map{$value->{authorised_value}} = $value->{lib};
199
    }
200
}
201
193
my $analytics_flag;
202
my $analytics_flag;
194
my $materials_flag; # set this if the items have anything in the materials field
203
my $materials_flag; # set this if the items have anything in the materials field
195
my $currentbranch = C4::Context->userenv ? C4::Context->userenv->{branch} : undef;
204
my $currentbranch = C4::Context->userenv ? C4::Context->userenv->{branch} : undef;
Lines 272-278 foreach my $item (@items) { Link Here
272
    }
281
    }
273
282
274
    if (defined($item->{'materials'}) && $item->{'materials'} =~ /\S/){
283
    if (defined($item->{'materials'}) && $item->{'materials'} =~ /\S/){
275
	$materials_flag = 1;
284
        $materials_flag = 1;
285
        if (defined $materials_map{ $item->{materials} }) {
286
            $item->{materials} = $materials_map{ $item->{materials} };
287
        }
276
    }
288
    }
277
289
278
    if ( C4::Context->preference('UseCourseReserves') ) {
290
    if ( C4::Context->preference('UseCourseReserves') ) {
279
- 

Return to bug 12670