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

(-)a/C4/Items.pm (-69 / +23 lines)
Lines 67-73 BEGIN { Link Here
67
        GetItemInfosOf
67
        GetItemInfosOf
68
        GetItemsByBiblioitemnumber
68
        GetItemsByBiblioitemnumber
69
        GetItemsInfo
69
        GetItemsInfo
70
	GetItemsLocationInfo
71
	GetHostItemsInfo
70
	GetHostItemsInfo
72
        GetItemnumbersForBiblio
71
        GetItemnumbersForBiblio
73
        get_itemnumbers_of
72
        get_itemnumbers_of
Lines 1207-1216 sub GetItemsByBiblioitemnumber { Link Here
1207
1206
1208
=head2 GetItemsInfo
1207
=head2 GetItemsInfo
1209
1208
1210
  @results = GetItemsInfo($biblionumber);
1209
  @results = GetItemsInfo($biblionumber, $order_by);
1211
1210
1212
Returns information about items with the given biblionumber.
1211
Returns information about items with the given biblionumber.
1213
1212
1213
The list is ordered by home branch name and some complex criteria
1214
within it (see the code), unless $order_by is specified.
1215
Currently only "cn_sort" is supported.
1216
1214
C<GetItemsInfo> returns a list of references-to-hash. Each element
1217
C<GetItemsInfo> returns a list of references-to-hash. Each element
1215
contains a number of keys. Most of them are attributes from the
1218
contains a number of keys. Most of them are attributes from the
1216
C<biblio>, C<biblioitems>, C<items>, and C<itemtypes> tables in the
1219
C<biblio>, C<biblioitems>, C<items>, and C<itemtypes> tables in the
Lines 1248-1254 If this is set, it is set to C<One Order>. Link Here
1248
=cut
1251
=cut
1249
1252
1250
sub GetItemsInfo {
1253
sub GetItemsInfo {
1251
    my ( $biblionumber ) = @_;
1254
    my ( $biblionumber, $order_by ) = @_;
1255
1252
    my $dbh   = C4::Context->dbh;
1256
    my $dbh   = C4::Context->dbh;
1253
    # note biblioitems.* must be avoided to prevent large marc and marcxml fields from killing performance.
1257
    # note biblioitems.* must be avoided to prevent large marc and marcxml fields from killing performance.
1254
    my $query = "
1258
    my $query = "
Lines 1278-1284 sub GetItemsInfo { Link Here
1278
     LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
1282
     LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
1279
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1283
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1280
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1284
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1281
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1285
    $query .= " WHERE items.biblionumber = ? ORDER BY ";
1286
    my $order_by_cause = "home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1287
    if ($order_by) {
1288
        if ($order_by eq 'cn_sort') {
1289
            $order_by_cause = "cn_sort ASC";
1290
        }
1291
        else {
1292
            warn qq{Unsupported order by "$order_by"};
1293
        }
1294
    }
1295
    $query .= $order_by_cause;
1296
1282
    my $sth = $dbh->prepare($query);
1297
    my $sth = $dbh->prepare($query);
1283
    $sth->execute($biblionumber);
1298
    $sth->execute($biblionumber);
1284
    my $i = 0;
1299
    my $i = 0;
Lines 1340-1345 sub GetItemsInfo { Link Here
1340
        if ( my $code = C4::Koha::GetAuthValCode( 'items.stack', $data->{frameworkcode} ) ) {
1355
        if ( my $code = C4::Koha::GetAuthValCode( 'items.stack', $data->{frameworkcode} ) ) {
1341
            $data->{stack}          = C4::Koha::GetKohaAuthorisedValueLib( $code, $data->{stack} );
1356
            $data->{stack}          = C4::Koha::GetKohaAuthorisedValueLib( $code, $data->{stack} );
1342
        }
1357
        }
1358
1359
        $data->{location_intranet} = GetKohaAuthorisedValueLib('LOC', $data->{location});
1360
        $data->{location_opac}     = GetKohaAuthorisedValueLib('LOC', $data->{location}, 1);
1361
1343
        # Find the last 3 people who borrowed this item.
1362
        # Find the last 3 people who borrowed this item.
1344
        my $sth2 = $dbh->prepare("SELECT * FROM old_issues,borrowers
1363
        my $sth2 = $dbh->prepare("SELECT * FROM old_issues,borrowers
1345
                                    WHERE itemnumber = ?
1364
                                    WHERE itemnumber = ?
Lines 1365-1435 sub GetItemsInfo { Link Here
1365
	}
1384
	}
1366
}
1385
}
1367
1386
1368
=head2 GetItemsLocationInfo
1369
1370
  my @itemlocinfo = GetItemsLocationInfo($biblionumber);
1371
1372
Returns the branch names, shelving location and itemcallnumber for each item attached to the biblio in question
1373
1374
C<GetItemsInfo> returns a list of references-to-hash. Data returned:
1375
1376
=over 2
1377
1378
=item C<$data-E<gt>{homebranch}>
1379
1380
Branch Name of the item's homebranch
1381
1382
=item C<$data-E<gt>{holdingbranch}>
1383
1384
Branch Name of the item's holdingbranch
1385
1386
=item C<$data-E<gt>{location}>
1387
1388
Item's shelving location code
1389
1390
=item C<$data-E<gt>{location_intranet}>
1391
1392
The intranet description for the Shelving Location as set in authorised_values 'LOC'
1393
1394
=item C<$data-E<gt>{location_opac}>
1395
1396
The OPAC description for the Shelving Location as set in authorised_values 'LOC'.  Falls back to intranet description if no OPAC 
1397
description is set.
1398
1399
=item C<$data-E<gt>{itemcallnumber}>
1400
1401
Item's itemcallnumber
1402
1403
=item C<$data-E<gt>{cn_sort}>
1404
1405
Item's call number normalized for sorting
1406
1407
=back
1408
  
1409
=cut
1410
1411
sub GetItemsLocationInfo {
1412
        my $biblionumber = shift;
1413
        my @results;
1414
1415
	my $dbh = C4::Context->dbh;
1416
	my $query = "SELECT a.branchname as homebranch, b.branchname as holdingbranch, 
1417
			    location, itemcallnumber, cn_sort
1418
		     FROM items, branches as a, branches as b
1419
		     WHERE homebranch = a.branchcode AND holdingbranch = b.branchcode 
1420
		     AND biblionumber = ?
1421
		     ORDER BY cn_sort ASC";
1422
	my $sth = $dbh->prepare($query);
1423
        $sth->execute($biblionumber);
1424
1425
        while ( my $data = $sth->fetchrow_hashref ) {
1426
             $data->{location_intranet} = GetKohaAuthorisedValueLib('LOC', $data->{location});
1427
             $data->{location_opac}= GetKohaAuthorisedValueLib('LOC', $data->{location}, 1);
1428
	     push @results, $data;
1429
	}
1430
	return @results;
1431
}
1432
1433
=head2 GetHostItemsInfo
1387
=head2 GetHostItemsInfo
1434
1388
1435
	$hostiteminfo = GetHostItemsInfo($hostfield);
1389
	$hostiteminfo = GetHostItemsInfo($hostfield);
(-)a/C4/Search.pm (-26 / +19 lines)
Lines 1853-1859 sub searchResults { Link Here
1853
        my $items_count           = scalar(@fields);
1853
        my $items_count           = scalar(@fields);
1854
        my $maxitems_pref = C4::Context->preference('maxItemsinSearchResults');
1854
        my $maxitems_pref = C4::Context->preference('maxItemsinSearchResults');
1855
        my $maxitems = $maxitems_pref ? $maxitems_pref - 1 : 1;
1855
        my $maxitems = $maxitems_pref ? $maxitems_pref - 1 : 1;
1856
        my @hiddenitems; # hidden itemnumbers based on OpacHiddenItems syspref
1857
1856
1858
        # loop through every item
1857
        # loop through every item
1859
        foreach my $field (@fields) {
1858
        foreach my $field (@fields) {
Lines 1875-1881 sub searchResults { Link Here
1875
                # hidden based on OpacHiddenItems syspref
1874
                # hidden based on OpacHiddenItems syspref
1876
                my @hi = C4::Items::GetHiddenItemnumbers($item);
1875
                my @hi = C4::Items::GetHiddenItemnumbers($item);
1877
                if (scalar @hi) {
1876
                if (scalar @hi) {
1878
                    push @hiddenitems, @hi;
1879
                    $hideatopac_count++;
1877
                    $hideatopac_count++;
1880
                    next;
1878
                    next;
1881
                }
1879
                }
Lines 1892-1910 sub searchResults { Link Here
1892
                $item->{'branchname'} = $branches{$item->{$otherbranch}};
1890
                $item->{'branchname'} = $branches{$item->{$otherbranch}};
1893
            }
1891
            }
1894
1892
1895
			my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber};
1893
            my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber};
1896
# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
1894
# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
1897
            my $userenv = C4::Context->userenv;
1895
            my $userenv = C4::Context->userenv;
1898
            if ( $item->{onloan} && !(C4::Members::GetHideLostItemsPreference($userenv->{'number'}) && $item->{itemlost}) ) {
1896
            if ( $item->{onloan} && !(C4::Members::GetHideLostItemsPreference($userenv->{'number'}) && $item->{itemlost}) ) {
1899
                $onloan_count++;
1897
                $onloan_count++;
1900
				my $key = $prefix . $item->{onloan} . $item->{barcode};
1898
                my $key = $prefix . $item->{onloan} . $item->{barcode};
1901
				$onloan_items->{$key}->{due_date} = format_date($item->{onloan});
1899
                $onloan_items->{$key} = { %$item };
1902
				$onloan_items->{$key}->{count}++ if $item->{$hbranch};
1900
                $onloan_items->{$key}->{due_date} = format_date($item->{onloan});
1903
				$onloan_items->{$key}->{branchname} = $item->{branchname};
1901
                $onloan_items->{$key}->{count}++ if $item->{$hbranch};
1904
				$onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} };
1902
                $onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} };
1905
				$onloan_items->{$key}->{itemcallnumber} = $item->{itemcallnumber};
1903
                $onloan_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1906
				$onloan_items->{$key}->{description} = $item->{description};
1907
				$onloan_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1908
                # if something's checked out and lost, mark it as 'long overdue'
1904
                # if something's checked out and lost, mark it as 'long overdue'
1909
                if ( $item->{itemlost} ) {
1905
                if ( $item->{itemlost} ) {
1910
                    $onloan_items->{$prefix}->{longoverdue}++;
1906
                    $onloan_items->{$prefix}->{longoverdue}++;
Lines 1981-2007 sub searchResults { Link Here
1981
                    $other_count++;
1977
                    $other_count++;
1982
1978
1983
                    my $key = $prefix . $item->{status};
1979
                    my $key = $prefix . $item->{status};
1984
                    foreach (qw(withdrawn itemlost damaged branchname itemcallnumber)) {
1980
                    $other_items->{$key} = { %$item };
1985
                        $other_items->{$key}->{$_} = $item->{$_};
1986
                    }
1987
                    $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0;
1981
                    $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0;
1988
                    $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
1982
                    $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
1989
                    $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value and $item->{notforloan};
1983
                    $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value)
1990
					$other_items->{$key}->{count}++ if $item->{$hbranch};
1984
                      if $notforloan_authorised_value and $item->{notforloan};
1991
					$other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
1985
                    $other_items->{$key}->{count}++
1992
					$other_items->{$key}->{description} = $item->{description};
1986
                      if $item->{$hbranch};
1993
					$other_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1987
                    $other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
1988
                    $other_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1994
                }
1989
                }
1995
                # item is available
1990
                # item is available
1996
                else {
1991
                else {
1997
                    $can_place_holds = 1;
1992
                    $can_place_holds = 1;
1998
                    $available_count++;
1993
                    $available_count++;
1999
					$available_items->{$prefix}->{count}++ if $item->{$hbranch};
1994
                    $available_items->{$prefix} = { %$item };
2000
					foreach (qw(branchname itemcallnumber description)) {
1995
                    $available_items->{$prefix}->{count}++ if $item->{$hbranch};
2001
                    	$available_items->{$prefix}->{$_} = $item->{$_};
1996
                    $available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} };
2002
					}
1997
                    $available_items->{$prefix}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
2003
					$available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} };
2004
					$available_items->{$prefix}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
2005
                }
1998
                }
2006
            }
1999
            }
2007
        }    # notforloan, item level and biblioitem level
2000
        }    # notforloan, item level and biblioitem level
Lines 2031-2037 sub searchResults { Link Here
2031
        warn $marcrecord->as_formatted if $DEBUG;
2024
        warn $marcrecord->as_formatted if $DEBUG;
2032
	my $interface = $search_context eq 'opac' ? 'OPAC' : '';
2025
	my $interface = $search_context eq 'opac' ? 'OPAC' : '';
2033
	if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) {
2026
	if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) {
2034
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems);
2027
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", [@available_items_loop, @onloan_items_loop, @other_items_loop], 1);
2035
	    # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
2028
	    # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
2036
        }
2029
        }
2037
2030
(-)a/C4/VirtualShelves/Page.pm (-4 / +4 lines)
Lines 261-271 sub shelfpage { Link Here
261
                ( $items, $totitems ) = GetShelfContents( $shelfnumber, $shelflimit, $shelfoffset, $sortfield, $direction );
261
                ( $items, $totitems ) = GetShelfContents( $shelfnumber, $shelflimit, $shelfoffset, $sortfield, $direction );
262
                for my $this_item (@$items) {
262
                for my $this_item (@$items) {
263
                    my $biblionumber = $this_item->{'biblionumber'};
263
                    my $biblionumber = $this_item->{'biblionumber'};
264
                    # Getting items infos for location display
265
                    my @items_infos = &GetItemsInfo( $this_item->{'biblionumber'}, "cn_sort" );
264
                    my $record = GetMarcBiblio($biblionumber);
266
                    my $record = GetMarcBiblio($biblionumber);
265
                    if (C4::Context->preference("OPACXSLTResultsDisplay") && $type eq 'opac') {
267
                    if (C4::Context->preference("OPACXSLTResultsDisplay") && $type eq 'opac') {
266
                        $this_item->{XSLTBloc} = XSLTParse4Display($biblionumber, $record, "OPACXSLTResultsDisplay");
268
                        $this_item->{XSLTBloc} = XSLTParse4Display($biblionumber, $record, "OPACXSLTResultsDisplay", \@items_infos);
267
                    } elsif (C4::Context->preference("XSLTResultsDisplay") && $type eq 'intranet') {
269
                    } elsif (C4::Context->preference("XSLTResultsDisplay") && $type eq 'intranet') {
268
                        $this_item->{XSLTBloc} = XSLTParse4Display($biblionumber, $record, "XSLTResultsDisplay");
270
                        $this_item->{XSLTBloc} = XSLTParse4Display($biblionumber, $record, "XSLTResultsDisplay", \@items_infos);
269
                    }
271
                    }
270
272
271
                    # the virtualshelfcontents table does not store these columns nor are they retrieved from the items
273
                    # the virtualshelfcontents table does not store these columns nor are they retrieved from the items
Lines 281-288 sub shelfpage { Link Here
281
                    $this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber($record,$marcflavour);
283
                    $this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber($record,$marcflavour);
282
                    $this_item->{'normalized_isbn'} = GetNormalizedISBN(undef,$record,$marcflavour);
284
                    $this_item->{'normalized_isbn'} = GetNormalizedISBN(undef,$record,$marcflavour);
283
                    if(!defined($this_item->{'size'})) { $this_item->{'size'} = "" }; #TT has problems with size
285
                    if(!defined($this_item->{'size'})) { $this_item->{'size'} = "" }; #TT has problems with size
284
                    # Getting items infos for location display
285
                    my @items_infos = &GetItemsLocationInfo( $this_item->{'biblionumber'});
286
                    $this_item->{'itemsissued'} = CountItemsIssued( $this_item->{'biblionumber'} );
286
                    $this_item->{'itemsissued'} = CountItemsIssued( $this_item->{'biblionumber'} );
287
                    $this_item->{'ITEM_RESULTS'} = \@items_infos;
287
                    $this_item->{'ITEM_RESULTS'} = \@items_infos;
288
                    if ( grep {$_ eq $biblionumber} @cart_list) {
288
                    if ( grep {$_ eq $biblionumber} @cart_list) {
(-)a/C4/XSLT.pm (-10 / +13 lines)
Lines 156-163 sub _get_best_default_xslt_filename { Link Here
156
    return $xslfilename;
156
    return $xslfilename;
157
}
157
}
158
158
159
=head2 XSLTParse4Display( $biblionumber, $orig_record, $xslsyspref, $items, $fixamps )
160
161
  $items => an array of items rerords, as returned from eg. GetItemsInfo
162
163
Returns XSLT block
164
165
=cut
166
159
sub XSLTParse4Display {
167
sub XSLTParse4Display {
160
    my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items ) = @_;
168
    my ( $biblionumber, $orig_record, $xslsyspref, $items, $fixamps ) = @_;
169
161
    my $xslfilename = C4::Context->preference($xslsyspref);
170
    my $xslfilename = C4::Context->preference($xslsyspref);
162
    if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) {
171
    if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) {
163
        my $htdocs;
172
        my $htdocs;
Lines 196-202 sub XSLTParse4Display { Link Here
196
    # grab the XML, run it through our stylesheet, push it out to the browser
205
    # grab the XML, run it through our stylesheet, push it out to the browser
197
    my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
206
    my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
198
    #return $record->as_formatted();
207
    #return $record->as_formatted();
199
    my $itemsxml  = buildKohaItemsNamespace($biblionumber, $hidden_items);
208
    my $itemsxml  = $items ? buildKohaItemsNamespace($biblionumber, $items) : "";
200
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
209
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
201
    my $sysxml = "<sysprefs>\n";
210
    my $sysxml = "<sysprefs>\n";
202
    foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow
211
    foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow
Lines 243-255 sub XSLTParse4Display { Link Here
243
}
252
}
244
253
245
sub buildKohaItemsNamespace {
254
sub buildKohaItemsNamespace {
246
    my ($biblionumber, $hidden_items) = @_;
255
    my ($biblionumber, $items) = @_;
247
248
    my @items = C4::Items::GetItemsInfo($biblionumber);
249
    if ($hidden_items && @$hidden_items) {
250
        my %hi = map {$_ => 1} @$hidden_items;
251
        @items = grep { !$hi{$_->{itemnumber}} } @items;
252
    }
253
256
254
    my $shelflocations = GetKohaAuthorisedValues('items.location',GetFrameworkCode($biblionumber), 'opac');
257
    my $shelflocations = GetKohaAuthorisedValues('items.location',GetFrameworkCode($biblionumber), 'opac');
255
    my $ccodes         = GetKohaAuthorisedValues('items.ccode',GetFrameworkCode($biblionumber), 'opac');
258
    my $ccodes         = GetKohaAuthorisedValues('items.ccode',GetFrameworkCode($biblionumber), 'opac');
Lines 259-265 sub buildKohaItemsNamespace { Link Here
259
    my $location = "";
262
    my $location = "";
260
    my $ccode = "";
263
    my $ccode = "";
261
    my $xml = '';
264
    my $xml = '';
262
    for my $item (@items) {
265
    for my $item (@$items) {
263
        my $status;
266
        my $status;
264
267
265
        my ( $transfertwhen, $transfertfrom, $transfertto ) = C4::Circulation::GetTransfers($item->{itemnumber});
268
        my ( $transfertwhen, $transfertfrom, $transfertto ) = C4::Circulation::GetTransfers($item->{itemnumber});
(-)a/catalogue/detail.pl (-6 / +6 lines)
Lines 84-95 my $fw = GetFrameworkCode($biblionumber); Link Here
84
my $showallitems = $query->param('showallitems');
84
my $showallitems = $query->param('showallitems');
85
my $marcflavour  = C4::Context->preference("marcflavour");
85
my $marcflavour  = C4::Context->preference("marcflavour");
86
86
87
# XSLT processing of some stuff
88
if (C4::Context->preference("XSLTDetailsDisplay") ) {
89
    $template->param('XSLTDetailsDisplay' =>'1',
90
        'XSLTBloc' => XSLTParse4Display($biblionumber, $record, "XSLTDetailsDisplay") );
91
}
92
93
$template->param( 'SpineLabelShowPrintOnBibDetails' => C4::Context->preference("SpineLabelShowPrintOnBibDetails") );
87
$template->param( 'SpineLabelShowPrintOnBibDetails' => C4::Context->preference("SpineLabelShowPrintOnBibDetails") );
94
$template->param( ocoins => GetCOinSBiblio($record) );
88
$template->param( ocoins => GetCOinSBiblio($record) );
95
89
Lines 137-142 if (@hostitems){ Link Here
137
	push (@items,@hostitems);
131
	push (@items,@hostitems);
138
}
132
}
139
133
134
# XSLT processing of some stuff
135
if (C4::Context->preference("XSLTDetailsDisplay") ) {
136
    $template->param('XSLTDetailsDisplay' =>'1',
137
        'XSLTBloc' => XSLTParse4Display($biblionumber, $record, "XSLTDetailsDisplay", \@all_items) );
138
}
139
140
my $dat = &GetBiblioData($biblionumber);
140
my $dat = &GetBiblioData($biblionumber);
141
141
142
#coping with subscriptions
142
#coping with subscriptions
(-)a/opac/opac-detail.pl (-6 / +5 lines)
Lines 107-117 SetUTF8Flag($record); Link Here
107
my $marcflavour      = C4::Context->preference("marcflavour");
107
my $marcflavour      = C4::Context->preference("marcflavour");
108
my $ean = GetNormalizedEAN( $record, $marcflavour );
108
my $ean = GetNormalizedEAN( $record, $marcflavour );
109
109
110
# XSLT processing of some stuff
111
if (C4::Context->preference("OPACXSLTDetailsDisplay") ) {
112
    $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, "OPACXSLTDetailsDisplay" ) );
113
}
114
115
my $OpacBrowseResults = C4::Context->preference("OpacBrowseResults");
110
my $OpacBrowseResults = C4::Context->preference("OpacBrowseResults");
116
$template->{VARS}->{'OpacBrowseResults'} = $OpacBrowseResults;
111
$template->{VARS}->{'OpacBrowseResults'} = $OpacBrowseResults;
117
112
Lines 450-455 if ($hideitems) { Link Here
450
    @items = @all_items;
445
    @items = @all_items;
451
}
446
}
452
447
448
# XSLT processing of some stuff
449
if (C4::Context->preference("OPACXSLTDetailsDisplay") ) {
450
    $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, "OPACXSLTDetailsDisplay", \@items) );
451
}
452
453
my $branches = GetBranches();
453
my $branches = GetBranches();
454
my $branch = '';
454
my $branch = '';
455
if (C4::Context->userenv){
455
if (C4::Context->userenv){
456
- 

Return to bug 11213