From 1a200b346e7ae9d774c8b5d70c311b79e3c2363d Mon Sep 17 00:00:00 2001 From: jeremy breuillard Date: Thu, 16 Dec 2021 17:59:03 +0100 Subject: [PATCH] Bug 6734: Show location in serials history table Opac: On a record(Serials) details the location wasn't displayed on the "Full history" tab Test plan: 1)Intranet: Make sure to have at least one Serial/Subscription created with the field 'location' filled in 2)Opac: Find your Serial/Subscription 3)Click 'More details' and notice the 3 tabs : Normal view, Brief history, Full history 4)Go to 'Full history' to see the detailed array 5)Apply patch and refresh your browser 6)The location is now above the array --- .../bootstrap/en/modules/opac-full-serial-issues.tt | 3 +++ opac/opac-serial-issues.pl | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt index 3c3bdcef9f..0566dc7e3c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt @@ -1,6 +1,7 @@ [% USE Koha %] [% USE KohaDates %] [% USE Branches %] +[% USE AuthorisedValues %] [% INCLUDE 'doc-head-open.inc' %] Full subscription history for [% bibliotitle | html %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] @@ -104,6 +105,8 @@ Full history [% END %] + +

Location: [% AuthorisedValues.GetByCode( 'LOC', location, 1 ) | html %]

Show year: diff --git a/opac/opac-serial-issues.pl b/opac/opac-serial-issues.pl index b84b176498..d3a9e2fbd6 100755 --- a/opac/opac-serial-issues.pl +++ b/opac/opac-serial-issues.pl @@ -35,6 +35,7 @@ $selectview = C4::Context->preference("SubscriptionHistory") unless $selectview; # my $id; my ( $template, $loggedinuser, $cookie ); my $biblionumber = $query->param('biblionumber'); +my $small_subscriptions = GetSubscriptionsFromBiblionumber($biblionumber); if ( $selectview eq "full" ) { ( $template, $loggedinuser, $cookie ) = get_template_and_user( { @@ -65,12 +66,14 @@ if ( $selectview eq "full" ) { my $title = $subscriptions->[0]->{bibliotitle}; my $yearmin = $subscriptions->[0]->{year}; my $yearmax = $subscriptions->[ -1 ]->{year}; + my $location = $small_subscriptions->[0]->{location}; $template->param( biblionumber => scalar $query->param('biblionumber'), years => $subscriptioninformation, yearmin => $yearmin, yearmax => $yearmax, + location => $location, bibliotitle => $title, suggestion => C4::Context->preference("suggestion"), virtualshelves => C4::Context->preference("virtualshelves"), @@ -87,7 +90,7 @@ else { } ); - my $subscriptions = GetSubscriptionsFromBiblionumber($biblionumber); + my $subscriptions = $small_subscriptions; # now, check is there is an alert subscription for one of the subscriptions if ($loggedinuser) { foreach (@$subscriptions) { -- 2.17.1