From 67737c9a048dd7872d48b6b2733123d5bfa5d771 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 4 Feb 2019 06:09:32 +0000 Subject: [PATCH] Bug 12318: Show shelving location on subscription tab in OPAC and staff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The shelving location can be helpful to locate an item in the library. Especially, if the library has decided not to create items for a subscription this information is currently not visible to the patron. To test: - Apply patch - Create a subscription, set location - View the subscription tab in detail and staff - Verify that the location now shows above the callnumber - Unset location in the subscription - Verify that the page still looks ok Signed-off-by: Mikaƫl Olangcay Brisebois --- catalogue/detail.pl | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 1 + koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 3 +++ opac/opac-detail.pl | 1 + 4 files changed, 6 insertions(+) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 154d63260a..27eb2787ce 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -180,6 +180,7 @@ foreach my $subscription (@subscriptions) { $cell{branchcode} = $subscription->{branchcode}; $cell{hasalert} = $subscription->{hasalert}; $cell{callnumber} = $subscription->{callnumber}; + $cell{location} = $subscription->{location}; $cell{closed} = $subscription->{closed}; #get the three latest serials. $serials_to_display = $subscription->{staffdisplaycount}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index bfab7727aa..2f3a432b90 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -658,6 +658,7 @@

At library: [% Branches.GetName(subscription.branchcode) || subscription.branchcode | html %]

[% END %] [% IF ( subscription.closed ) %]

This subscription is closed.

[% END %] + [% IF ( subscription.location ) %]

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

[% END %] [% IF ( subscription.callnumber ) %]

Callnumber: [% subscription.callnumber | html %]

[% END %] [% IF ( subscription.subscriptionnotes ) %]

[% subscription.subscriptionnotes | html | html_line_break %]

[% END %] [% IF ( subscription.missinglist ) %]

Missing issues: [% subscription.missinglist | html %]

[% END %] 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 d8a93cbba9..ca1f3eee92 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -807,6 +807,9 @@ [% IF ( subscription.closed ) %]

This subscription is closed.

[% END %] + [% IF ( subscription.location ) %] +

Location: [% AuthorisedValues.GetByCode( 'LOC', subscription.location ) | html %] + [% END %] [% IF ( subscription.callnumber ) %]

Call number: [% subscription.callnumber | html %]

[% END %] diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index a7c24ef3d9..d4bc7613b9 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -593,6 +593,7 @@ foreach my $subscription (@subscriptions) { $cell{histenddate} = $subscription->{histenddate}; $cell{branchcode} = $subscription->{branchcode}; $cell{callnumber} = $subscription->{callnumber}; + $cell{location} = $subscription->{location}; $cell{closed} = $subscription->{closed}; $cell{letter} = $subscription->{letter}; $cell{biblionumber} = $subscription->{biblionumber}; -- 2.17.1