From 6075b3932f50537a9013b02b6f9b5673e1d0d338 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 9 Aug 2021 10:33:22 +0100 Subject: [PATCH] Bug 11175: (WIP) Remove special XSLT handling for parts With the work to move this into it's own tab in the details display, we don't need the special handling in the XSLT display templates, utils or module. --- C4/XSLT.pm | 25 +------ .../prog/css/src/staff-global.scss | 9 --- .../en/xslt/MARC21slim2intranetDetail.xsl | 2 - .../prog/en/xslt/MARC21slimUtils.xsl | 73 ------------------- .../en/xslt/MARC21slim2OPACDetail.xsl | 2 - .../bootstrap/en/xslt/MARC21slimUtils.xsl | 67 ----------------- 6 files changed, 3 insertions(+), 175 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index f9618ca578..7a259a6680 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -266,11 +266,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'); @@ -281,25 +280,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; } } @@ -309,7 +290,7 @@ sub XSLTParse4Display { } $varxml .= "\n"; - $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/\&amp;/\&/g; $xmlrecord =~ s/\&\;lt\;/\<\;/g; diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index 297742000c..e3fb1e464f 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -577,7 +577,6 @@ ol { li { list-style: decimal; - list-style-position: inside; } &.bibliodetails { @@ -598,14 +597,6 @@ ol { padding: 7px 0; } -.componentPartRecordsContainer { - float: right; - overflow-y: auto; - overflow-x: hidden; - max-width: 50%; - max-height: 25em; -} - #editions { table, td { diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 0142de249c..49cbd715f6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -115,8 +115,6 @@ - -

diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl index f947d4ade9..7ac4911cfd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl @@ -577,79 +577,6 @@ - - - - - - - - -

diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl index 11b1bbebcf..fdd334d7fd 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl @@ -541,73 +541,6 @@ - - - - - - - -