@@ -, +, @@
---
catalogue/detail.pl | 19 ++++++++++++++++
.../prog/en/modules/catalogue/detail.tt | 22 +++++++++++++++++++
2 files changed, 41 insertions(+)
--- a/catalogue/detail.pl
+++ a/catalogue/detail.pl
@@ -210,6 +210,25 @@ 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 = [ '
test
' ];
+ for my $part ( @{$components} ) {
+ push @{$parts}, XSLTParse4Display(
+ 1, $part, "XSLTResultsDisplay", 1,
+ undef, $sysxml, $xslparts, $lang,
+ );
+ }
+ $template->param(
+ ShowComponentParts => $parts
+ );
+ }
+ }
+}
# Get acquisition details
if ( C4::Context->preference('AcquisitionDetails') ) {
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
@@ -278,6 +278,7 @@
[% END %]
[% IF ( MARCNOTES || notes ) %]Descriptions ([% ( MARCNOTES.size || 1 ) | html %])[% END %]
+[% IF ( ShowComponentParts ) %]Components ([% ( ShowComponentParts.size || 1 ) %])[% END %]
[% IF ( subscriptionsnumber ) %]Subscriptions[% END %]
[% IF Koha.Preference('AcquisitionDetails') %]Acquisition details[% END %]
[% IF suggestions.count %]Suggestion details[% END %]
@@ -683,6 +684,27 @@ Note that permanent location is a code, and location may be an authval.
[% END %]
+[% IF ShowComponentParts.size %]
+
+
+
Components
+
+ [% FOR PART IN ShowComponentParts %]
+
+
+ 1
+ |
+
+ [% PART | $raw %]
+ |
+
+ [% END %]
+
+
+
+
+[% END %]
+
[% IF ( subscriptionsnumber ) %]