From 88333b0bfa254970d84affb7dbe9d728c734c9e5 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 9 Aug 2021 11:08:06 +0100 Subject: [PATCH] Bug 11175: (WIP) OPAC --- .../opac-tmpl/bootstrap/css/src/opac.scss | 9 -------- .../bootstrap/en/modules/opac-detail.tt | 17 +++++++++++++++ opac/opac-detail.pl | 21 +++++++++++++++++++ 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index fea70a154f..6a5dee0e36 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -291,15 +291,6 @@ th { } } - -.componentPartRecordsContainer { - float: right; - overflow-y: auto; - overflow-x: hidden; - max-width: 50%; - max-height: 25em; -} - #members { p { color: #727272; diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index dd0a4ff8ee..7d53517ba8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -531,6 +531,7 @@ [% IF SYNDETICS_SUMMARY %][% SET title_notes_count = title_notes_count + 1 %][% END %]
  • Title notes ( [% title_notes_count | html %] )
  • [% END %] + [% IF ( ComponentParts ) %]
  • Components ([% ( ComponentParts.size || 1 ) %])
  • [% END %] [% IF ( SYNDETICS_TOC ) %]
  • TOC
  • [% END %] @@ -713,6 +714,22 @@ [% END # / IF MARCNOTES || notes %] + [% IF ComponentParts.size %] +
    +
    + + [% FOR PART IN ComponentParts %] + + + + [% END %] +
    + [% PART | $raw %] +
    +
    +
    + [% END %] + [% IF ( SyndeticsEnabled ) %] [% IF ( SyndeticsTOC && SYNDETICS_TOC ) %]
    diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index da5f19f2ab..91bb209e3d 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -690,6 +690,27 @@ my $separatebranch = C4::Context->preference('OpacSeparateHoldingsBranch'); my $viewallitems = $query->param('viewallitems'); my $max_items_to_display = C4::Context->preference('OpacMaxItemsToDisplay') // 50; +# Get component parts details +my $showcomp = C4::Context->preference('ShowComponentRecords'); +if ( $showcomp eq 'both' || $showcomp eq 'opac' ) { + if ( my $components = $biblio->get_marc_analytics(300) ) { + my $xslparts = C4::Context->preference('OPACXSLTResultsDisplay') || "default"; + if ( $xslparts ) { + my $parts; + for my $part ( @{$components} ) { + $part = MARC::Record->new_from_xml( $part, 'UTF-8' ); + + push @{$parts}, + XSLTParse4Display( 1, $part, "OPACXSLTResultsDisplay", 1, + undef, $sysxml, $xslparts, $lang, ); + } + $template->param( + ComponentParts => $parts + ); + } + } +} + # Get items on order my ( @itemnumbers_on_order ); if ( C4::Context->preference('OPACAcquisitionDetails' ) ) { -- 2.20.1