From ae5d44851c25489f3db97fd007cac385473f25da Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 16 Dec 2013 11:57:15 +0100 Subject: [PATCH] [PASSED QA] Bug 11397: Remove the itemnumber list on the Acquisition detail tab Test plan: - verify this patch does not introduce regression on the enhancement introduced by bug 8230. - verify the itemnumber list does not appears anymore. Signed-off-by: Nicole C. Engard The acquisitions details tab on the holdings table in the staff client no longer shows the links to the items. Tests pass. Signed-off-by: Katrin Fischer Passes all tests and QA script. In my tests the itemnumbers didn't show up on the acquisition detail tab before the patch. So the patch visually only changed the column header for me. All other acquisition related information showed up ok. --- catalogue/detail.pl | 16 ++++++---------- .../prog/en/modules/catalogue/detail.tt | 21 ++++++--------------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index a3df03b..9cbf7f2 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -20,7 +20,7 @@ use strict; use warnings; use CGI; -use C4::Acquisition qw( GetHistory GetItemnumbersFromOrder ); +use C4::Acquisition qw( GetHistory ); use C4::Auth; use C4::Dates qw/format_date/; use C4::Koha; @@ -167,16 +167,12 @@ foreach my $subscription (@subscriptions) { # Get acquisition details -my ( $orders, $qty, $price, $received ) = C4::Acquisition::GetHistory( biblionumber => $biblionumber, get_canceled_order => 1 ); -if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) { - for my $order ( @$orders ) { - $order->{itemnumbers} = [ C4::Acquisition::GetItemnumbersFromOrder( $order->{ordernumber} ) ]; - } +if ( C4::Context->preference('AcquisitionDetails') ) { + my ( $orders, $qty, $price, $received ) = C4::Acquisition::GetHistory( biblionumber => $biblionumber, get_canceled_order => 1 ); + $template->param( + orders => $orders, + ); } -$template->param( - orders => $orders, - AcquisitionDetails => C4::Context->preference('AcquisitionDetails'), -); if ( defined $dat->{'itemtype'} ) { $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }{imageurl} ); 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 1a81ef7..a94f92e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1,3 +1,4 @@ +[% USE Koha %] [% USE KohaDates %] [% USE AuthorisedValues %] [% USE KohaDates %] @@ -256,7 +257,7 @@ function verify_images() { table.before(link); deactivate_filters(id); } - [% IF AcquisitionDetails %] + [% IF Koha.Preference('AcquisitionDetails') %] $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, { 'sDom': 't', 'bPaginate': false, @@ -496,7 +497,7 @@ function verify_images() { [% END %] [% IF ( MARCNOTES || notes ) %]
  • Descriptions
  • [% END %] [% IF ( subscriptionsnumber ) %]
  • Subscriptions
  • [% END %] -[% IF AcquisitionDetails %]
  • Acquisition details
  • [% END %] +[% IF Koha.Preference('AcquisitionDetails') %]
  • Acquisition details
  • [% END %] [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
  • Editions
  • [% END %][% END %] [% IF ( LocalCoverImages ) %][% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %]
  • Images
  • [% END %][% END %] [% IF ( HTML5MediaEnabled ) %][% IF ( HTML5MediaSets ) %]
  • Play media
  • [% END %][% END %] @@ -825,7 +826,7 @@ function verify_images() { [% END %] -[% IF AcquisitionDetails %] +[% IF Koha.Preference('AcquisitionDetails') %]
    [% IF orders %] @@ -836,7 +837,7 @@ function verify_images() { - + @@ -859,17 +860,7 @@ function verify_images() { [% CASE 'cancelled' %]Cancelled [% END %] - [% END %] -- 1.8.3.2
    Creation date Receive date StatusQuantity / itemsQuantity
    - [% order.quantity %] - [% IF order.itemnumbers.size > 0 && order.orderstatus != 'cancelled' %] - ( - [% FOR itemnumber IN order.itemnumbers %] - [% itemnumber %] - [%- UNLESS loop.last %],[% END %] - [% END %] - ) - [% END %] - + [% order.quantity %]