From 3625c9083e2a2c949616e49a06b034b58c86d2a4 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 --- .../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 5818cf1740..f9400955e5 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 @@ -61,6 +61,11 @@
  • Planning
  • Issues
  • Summary
  • + [% IF order_count %] +
  • + Acquisition details +
  • + [% END %]
    @@ -332,7 +337,7 @@
    - [% IF orders %] + [% IF order_count %]

    Acquisition details

    diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl index cc7a5d2985..4915cb27f4 100755 --- a/serials/subscription-detail.pl +++ b/serials/subscription-detail.pl @@ -144,6 +144,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.19.1