@@ -, +, @@
---
C4/XSLT.pm | 25 +------
catalogue/detail.pl | 20 +++++
.../prog/css/src/staff-global.scss | 9 ---
.../prog/en/modules/catalogue/detail.tt | 18 +++++
.../en/xslt/MARC21slim2intranetDetail.xsl | 2 -
.../prog/en/xslt/MARC21slimUtils.xsl | 73 -------------------
.../opac-tmpl/bootstrap/css/src/opac.scss | 9 ---
.../bootstrap/en/modules/opac-detail.tt | 17 +++++
.../en/xslt/MARC21slim2OPACDetail.xsl | 2 -
.../bootstrap/en/xslt/MARC21slimUtils.xsl | 67 -----------------
opac/opac-detail.pl | 21 ++++++
11 files changed, 79 insertions(+), 184 deletions(-)
--- a/C4/XSLT.pm
+++ a/C4/XSLT.pm
@@ -282,11 +282,10 @@ sub XSLTParse4Display {
}
}
- my $partsxml = '';
- # possibly insert component records into Detail views
+ # possibly show analytics link in Detail views
if ($xslsyspref =~ m/Details/) {
$biblio //= Koha::Biblios->find( $biblionumber );
- my $components = $biblio->get_marc_analytics(300);
+ my $components = $biblio->get_marc_analytics();
$variables->{show_analytics_link} = ( scalar @{$components} == 0 ) ? 0 : 1;
my $showcomp = C4::Context->preference('ShowComponentRecords');
@@ -297,25 +296,7 @@ sub XSLTParse4Display {
|| ( $showcomp eq 'opac' && $xslsyspref =~ m/OPAC/ ) )
)
{
-
$variables->{show_analytics_link} = 0;
-
- my $search_query = $biblio->get_analytics_query;
- $variables->{ComponentPartQuery} = $search_query;
-
- my @componentPartRecordXML = ('');
- for my $cb ( @{ $components } ) {
- if( ref $cb eq 'MARC::Record'){
- $cb = $cb->as_xml_record();
- } else {
- $cb = decode('utf8', $cb);
- }
- # Remove the xml header
- $cb =~ s/^<\?xml.*?\?>//;
- push @componentPartRecordXML,$cb;
- }
- push @componentPartRecordXML, '';
- $partsxml = join "\n", @componentPartRecordXML;
}
}
@@ -326,7 +307,7 @@ sub XSLTParse4Display {
$varxml .= "\n";
my $sysxml = get_xslt_sysprefs();
- $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml$varxml$partsxml\<\/record\>/;
+ $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml$varxml\<\/record\>/;
if ($fixamps) { # We need to correct the ampersand entities that Zebra outputs
$xmlrecord =~ s/\&/\&/g;
$xmlrecord =~ s/\&\;lt\;/\<\;/g;
--- a/catalogue/detail.pl
+++ a/catalogue/detail.pl
@@ -210,6 +210,26 @@ foreach my $subscription (@subscriptions) {
push @subs, \%cell;
}
+# Get component parts details
+my $showcomp = C4::Context->preference('ShowComponentRecords');
+if ( $showcomp eq 'both' || $showcomp eq 'staff' ) {
+ if ( my $components = $biblio->get_marc_analytics(300) ) {
+ my $xslparts = C4::Context->preference('XSLTResultsDisplay') || "default";
+ if ( $xslparts ) {
+ my $parts;
+ for my $part ( @{$components} ) {
+ $part = MARC::Record->new_from_xml( $part, 'UTF-8' );
+
+ push @{$parts},
+ XSLTParse4Display( 1, $part, "XSLTResultsDisplay", 1,
+ undef, $sysxml, $xslparts, $lang, );
+ }
+ $template->param(
+ ComponentParts => $parts
+ );
+ }
+ }
+}
# Get acquisition details
if ( C4::Context->preference('AcquisitionDetails') ) {
--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
+++ a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
@@ -583,7 +583,6 @@ ol {
li {
list-style: decimal;
- list-style-position: inside;
}
&.bibliodetails {
@@ -604,14 +603,6 @@ ol {
padding: 7px 0;
}
-.componentPartRecordsContainer {
- float: right;
- overflow-y: auto;
- overflow-x: hidden;
- max-width: 50%;
- max-height: 25em;
-}
-
#editions {
table,
td {
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
@@ -274,6 +274,7 @@
[% END %]
[% IF ( MARCNOTES || notes ) %]
Descriptions ([% ( MARCNOTES.size || 1 ) | html %])[% END %]
+[% IF ( ComponentParts ) %]Components ([% ( ComponentParts.size || 1 ) %])[% END %]
[% IF ( subscriptionsnumber ) %]Subscriptions[% END %]
[% IF Koha.Preference('AcquisitionDetails') %]Acquisition details[% END %]
[% IF suggestions.count %]Suggestion details[% END %]
@@ -679,6 +680,23 @@ Note that permanent location is a code, and location may be an authval.
[% END %]
+[% IF ComponentParts.size %]
+
+
+
+ [% FOR PART IN ComponentParts %]
+
+
+ [% PART | $raw %]
+ |
+
+ [% END %]
+
+
+
+
+[% END %]
+
[% IF ( subscriptionsnumber ) %]
--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
+++ a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
@@ -115,8 +115,6 @@
-
-
--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl
+++ a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl
@@ -577,79 +577,6 @@
-
-
-
-
-
-
-
-
-
[% END # / IF MARCNOTES || notes %]
+ [% IF ComponentParts.size %]
+
+
+
+ [% FOR PART IN ComponentParts %]
+
+
+ [% PART | $raw %]
+ |
+
+ [% END %]
+
+
+
+ [% END %]
+
[% IF ( SyndeticsEnabled ) %]
[% IF ( SyndeticsTOC && SYNDETICS_TOC ) %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl
@@ -127,8 +127,6 @@
-
-
--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl
@@ -541,73 +541,6 @@
-
-
-
-
-
-
-
-