From 947ff747e191708cc7dddb2d2d6877c81cfc9cd3 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 --- .../intranet-tmpl/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 55d4e68..a01fb8b 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 %]
    @@ -335,7 +340,7 @@
    - [% IF orders %] + [% IF order_count %]

    Acquisition details

    diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl index cc7a5d2..4915cb2 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.1.4