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 268-274 foreach my $item (@items) { Link Here
268
    }
279
    }
269
280
270
    if (defined($item->{'materials'}) && $item->{'materials'} =~ /\S/){
281
    if (defined($item->{'materials'}) && $item->{'materials'} =~ /\S/){
271
	$materials_flag = 1;
282
        $materials_flag = 1;
283
        if (defined $materials_map{ $item->{materials} }) {
284
            $item->{materials} = $materials_map{ $item->{materials} };
285
        }
272
    }
286
    }
273
287
274
    if ( C4::Context->preference('UseCourseReserves') ) {
288
    if ( C4::Context->preference('UseCourseReserves') ) {
275
- 

Return to bug 12670