From d163e7e5785256e9735d588f934a711fd0f6fb1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Mon, 7 Mar 2011 11:44:03 -0500 Subject: [PATCH] Bug 5830 Using XSLT on OPAC Lists page On OPAC Lists page (opac-shelves.pl), biblio records are now displayed accordingly to OPACXSLTResultsDisplay system preference. Signed-off-by: Nicole C. Engard Signed-off-by: Chris Cormack --- C4/VirtualShelves/Page.pm | 7 ++++++- koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index 66c614d617..3614c24ce6 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -35,6 +35,7 @@ use C4::Tags qw(get_tags); use Exporter; use Data::Dumper; use C4::Csv; +use C4::XSLT; use vars qw($debug @EXPORT @ISA $VERSION); @@ -201,7 +202,11 @@ sub shelfpage ($$$$$) { } ( $items, $totitems ) = GetShelfContents( $shelfnumber, $shelflimit, $shelfoffset ); for my $this_item (@$items) { - my $record = GetMarcBiblio( $this_item->{'biblionumber'} ); + my $biblionumber = $this_item->{'biblionumber'}; + my $record = GetMarcBiblio($biblionumber); + $this_item->{XSLTBloc} = + XSLTParse4Display($biblionumber, $record, 'Results', 'opac') + if C4::Context->preference("OPACXSLTResultsDisplay"); # the virtualshelfcontents table does not store these columns nor are they retrieved from the items # and itemtypes tables, so I'm commenting them out for now to quiet the log -crn diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl index 1e1d2d5fe1..464636529e 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl @@ -249,6 +249,10 @@ $(function() { + + + + " title="View details for this title"> " title="View details for this title"> @@ -272,7 +276,7 @@ $(function() { ()., This record has no items. - + -- 2.20.1