From 05240ae978dc094ef4cfb9ff54891d210920e7a8 Mon Sep 17 00:00:00 2001 From: Lyon3 Team Date: Thu, 17 Jan 2013 18:55:01 +0100 Subject: [PATCH] Bug 7654: Add location at opac subscription view Also fix a bug that prevent branch name to be displayed --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 9 ++++----- opac/opac-detail.pl | 2 ++ 2 files changed, 6 insertions(+), 5 deletions(-) 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 e4fb61f..f62cad9 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -796,11 +796,7 @@

There are [% subscriptionsnumber %] subscription(s) associated with this title.

[% FOREACH subscription IN subscriptions %] [% IF ( subscription.branchcode ) %] -

At library: [% Branches.GetName( subscription.branchname ) %]

- [% ELSE %] - [% IF ( subscription.branchcode ) %] -

At library: [% subscription.branchcode %]

- [% END %] +

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

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

This subscription is closed.

@@ -816,6 +812,9 @@ [% IF ( subscription.opacnote ) %]

[% subscription.opacnote FILTER html_line_break %]

[% END %] + [% IF subscription.location_description || subscription.location %] +

Location: [% IF subscription.location_description %][% subscription.location_description %][% ELSE %][% subscription.location %][% END %]

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

Call number: [% subscription.callnumber %]

[% END %] diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index a7e643c..2734ae7 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -569,6 +569,8 @@ foreach my $subscription (@subscriptions) { $cell{histenddate} = $subscription->{histenddate}; $cell{branchcode} = $subscription->{branchcode}; $cell{hasalert} = $subscription->{hasalert}; + $cell{location} = $subscription->{location}; + $cell{location_description} = $shelflocations->{ $subscription->{'location'} }; $cell{callnumber} = $subscription->{callnumber}; $cell{closed} = $subscription->{closed}; #get the three latest serials. -- 2.1.4