From 777e29e420b96ed7e6d63aff7c6b69ecc9c1d2ee Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 9 Oct 2018 17:19:09 +0000 Subject: [PATCH] Bug 21511: Don't show acquisition details on subscription detail when there is no acq data This patch modifies the subscription detail page so that acquisitions details section is not shown when there is no acquisitions data. The acquisitions details are moved into a new tab similar to how it appears on the bibliographic details page. A count of orders is now passed to the template so that the check for existing acquisitions data will work correctly. To test, apply the patch and view the detail page for subscriptions. - When viewing a subscription for which there are orders you should see an "Acquisitions details" tab containing the acquisitions data. - When viewing a subscription with no orders the tab should not appear. Signed-off-by: Katrin Fischer Signed-off-by: Chris Cormack Signed-off-by: Nick Clemens --- .../prog/en/modules/serials/subscription-detail.tt | 7 ++++++- serials/subscription-detail.pl | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) 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 a2cb7d48fd..a5dbfd4067 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 @@ -65,6 +65,11 @@
  • Planning
  • Issues
  • Summary
  • + [% IF order_count %] +
  • + Acquisition details +
  • + [% END %]
    @@ -340,7 +345,7 @@
    - [% IF orders %] + [% IF order_count %]

    Acquisition details

    diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl index 4eefe181f3..2e1139b090 100755 --- a/serials/subscription-detail.pl +++ b/serials/subscription-detail.pl @@ -148,6 +148,7 @@ $template->param( irregular_issues => scalar @irregular_issues, default_bib_view => $default_bib_view, orders => $orders, + order_count => $orders->count, (uc(C4::Context->preference("marcflavour"))) => 1, ); -- 2.39.5