From 4b588121e482e6be8ffef38cf000913792ad17f4 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Fri, 7 Jul 2023 15:27:42 +0000 Subject: [PATCH] Bug 34199: Add full title information to subscription detail page Show the full title information, including part_name and part_number on the subscription detail page. To test: * Add a subscription linked to a record with 245$abnp set * Verify only 245$ab will show up on the subscription detail page * Apply patch * Verify that the full title information shows up on the detail page Signed-off-by: Sam Lau Signed-off-by: Chris Cormack Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/serials/subscription-detail.tt | 8 ++++++-- serials/subscription-detail.pl | 10 ++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt index 3d3d5a5052..e596aba702 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt @@ -7,6 +7,7 @@ [% USE Price %] [% USE TablesSettings %] [% SET footerjs = 1 %] +[%- PROCESS 'html_helpers.inc' -%] [% INCLUDE 'doc-head-open.inc' %] Details for subscription #[% subscriptionid | html %] › Serials › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -42,7 +43,7 @@ [% INCLUDE 'serials-toolbar.inc' %] [% INCLUDE 'mana/mana-comment-status.inc' %] -

Subscription for [% bibliotitle | html %] [% bibliosubtitle | html %] [% IF closed %](closed)[% END %]

+

Subscription for [% INCLUDE 'biblio-title.inc' biblio=subscription.biblio link = 0 %] [% IF closed %](closed)[% END %]

[% IF ( abouttoexpire ) %] [% UNLESS closed %] @@ -102,7 +103,10 @@
  • Subscription ID: [% subscriptionid | html %]
  • Librarian identity: [% librarian | html %]
  • Vendor: [% aqbooksellername | html %]
  • -
  • Biblio: [% bibliotitle | html %] [% bibliosubtitle | html %] ([% bibnum | html %])
  • +
  • + Bibliographic record: + [%- INCLUDE 'biblio-title.inc' biblio=subscription.biblio link = 1 -%] ([% subscription.biblionumber | html %]) +
  • [% IF ( OPACBaseURL ) %]
  • OPAC view: diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl index 2ae5cd3ef7..74a0ee8aab 100755 --- a/serials/subscription-detail.pl +++ b/serials/subscription-detail.pl @@ -36,8 +36,9 @@ use Koha::SharedContent; my $query = CGI->new; my $op = $query->param('op') || q{}; my $issueconfirmed = $query->param('issueconfirmed'); -my $dbh = C4::Context->dbh; +my $dbh = C4::Context->dbh; my $subscriptionid = $query->param('subscriptionid'); +my $subscription = Koha::Subscriptions->find( $subscriptionid ); if ( $op and $op eq "close" ) { C4::Serials::CloseSubscription( $subscriptionid ); @@ -124,13 +125,9 @@ my @irregular_issues = split /;/, $subs->{irregularity}; my $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subs->{periodicity}); my $numberpattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subs->{numberpattern}); -my $subscription_object = Koha::Subscriptions->find( $subscriptionid ); $template->param( available_additional_fields => Koha::AdditionalFields->search( { tablename => 'subscription' } ), - additional_field_values => { - map { $_->field->name => $_->value } - $subscription_object->additional_field_values->as_list - }, + additional_field_values => { map { $_->field->name => $_->value } $subscription->additional_field_values->as_list }, ); # FIXME Do we want to hide canceled orders? @@ -151,6 +148,7 @@ while ( my $o = $orders->next ) { } $template->param( + subscription => $subscription, subscriptionid => $subscriptionid, serialslist => \@serialslist, hasRouting => $hasRouting,