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

(-)a/catalogue/detail.pl (-2 / +15 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
if ($materials_authvalcode) {
196
    my $materials_authvals = GetAuthorisedValues($materials_authvalcode);
197
    if ($materials_authvals) {
198
        foreach my $value (@$materials_authvals) {
199
            $materials_map{$value->{authorised_value}} = $value->{lib};
200
        }
201
    }
202
}
203
193
my $analytics_flag;
204
my $analytics_flag;
194
my $materials_flag; # set this if the items have anything in the materials field
205
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;
206
my $currentbranch = C4::Context->userenv ? C4::Context->userenv->{branch} : undef;
Lines 272-278 foreach my $item (@items) { Link Here
272
    }
283
    }
273
284
274
    if (defined($item->{'materials'}) && $item->{'materials'} =~ /\S/){
285
    if (defined($item->{'materials'}) && $item->{'materials'} =~ /\S/){
275
	$materials_flag = 1;
286
        $materials_flag = 1;
287
        if (defined $materials_map{ $item->{materials} }) {
288
            $item->{materials} = $materials_map{ $item->{materials} };
289
        }
276
    }
290
    }
277
291
278
    if ( C4::Context->preference('UseCourseReserves') ) {
292
    if ( C4::Context->preference('UseCourseReserves') ) {
279
- 

Return to bug 12670