From fe31bff55039df3d258a2969f9ff95164599c137 Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Thu, 28 Mar 2024 08:19:20 +0200 Subject: [PATCH 07/14] Bug 36135: Fix QA issues and add improvements This patch: - Fixes issues reported by qa-tool - Adds info about how many holds were modified - Add title and barcode columns to table of modified holds - Adds div with class "page-section" to "Modify holds" table Sponsored-by: Koha-Suomi Oy Signed-off-by: Lucas Gass --- .../en/modules/tools/batch_modify_holds.tt | 128 +++++++++--------- tools/batch_modify_holds.pl | 5 +- 2 files changed, 69 insertions(+), 64 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_modify_holds.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_modify_holds.tt index 07d3cba20e..f8829ca8c5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_modify_holds.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_modify_holds.tt @@ -48,15 +48,12 @@ NOTE! Column patron_expiration_date is used as a main filter for expiration date field. Otherwise column expirationdate is used.
  1. - -
  2. - - -
  3. -
  4. - - -
  5. + + + +
  6. + +
  7. @@ -82,15 +79,12 @@
  8. - -
  9. - - -
  10. -
  11. - - -
  12. + + + +
  13. + +
  14. @@ -108,7 +102,7 @@
    [% INCLUDE 'csrf-token.inc' %] [% IF holds.count %] -

    Found [% holds.count | html %][% IF holds.count > 1 %] holds [% ELSE %] hold [% END %]to modify.

    +

    Found [% holds.count | html %][% IF holds.count > 1 %] holds [% ELSE %] hold [% END %]to modify.

    Select all @@ -120,7 +114,7 @@   Expiration date Patron expiration date - Title + Title Barcode Status Hold pickup library @@ -131,12 +125,16 @@ [% FOREACH hold IN holds %] - + [% IF hold.found %] + + [% ELSE %] + + [% END %] [% hold.expirationdate | $KohaDates %] [% hold.patron_expiration_date | $KohaDates %] - [% hold.item.biblio.title | html %] - [% hold.item.barcode | html %] + [% hold.biblio.title | html %] + [% hold.item.barcode | html %] [% IF hold.found == "T" %] In transit @@ -158,43 +156,45 @@

    Modify holds

    - - - - - - - - - - - - - - - - - - - -
    New expiration dateNew pickup librarySuspend holdsSuspend untilNew reserve note
    - - - - - - - - - -
    +
    + + + + + + + + + + + + + + + + + + + +
    New expiration dateNew pickup librarySuspend holdsSuspend untilNew reserve note
    + + + + + + + + + +
    +
    @@ -209,13 +209,15 @@ [% END %] [% ELSIF view == 'report' %]
    - Holds have been modified! + [% updated_holds.count | html %] holds have been modified!
    + + @@ -226,6 +228,8 @@ [% FOREACH hold IN updated_holds %] + + @@ -309,7 +313,7 @@ } if( ( !new_suspend_status || new_suspend_status == "not_suspended") && new_suspend_date ){ e.preventDefault(); - alert(_('You have to suspend holds if new suspend until date is set.')); + alert(_("You have to suspend holds if new suspend until date is set.")); return false; } diff --git a/tools/batch_modify_holds.pl b/tools/batch_modify_holds.pl index 0762ad1f3f..8d3f29a59a 100755 --- a/tools/batch_modify_holds.pl +++ b/tools/batch_modify_holds.pl @@ -120,7 +120,7 @@ if ( $op eq 'form' ) { my $holds = Koha::Holds->search( $search_params, - { join => ["item"] } + { join => [ "item", "biblio" ] } ); $template->param( @@ -139,7 +139,8 @@ if ( $op eq 'cud-modify' ) { @hold_ids = $input->multi_param('hold_id'); - my $holds_to_update = Koha::Holds->search( { reserve_id => { -in => \@hold_ids } } ); + my $holds_to_update = + Koha::Holds->search( { reserve_id => { -in => \@hold_ids } }, { join => [ "item", "biblio" ] } ); while ( my $hold = $holds_to_update->next ) { -- 2.34.1
    Expiration dateTitleBarcode Hold pickup library Suspended Suspended until
    [% hold.expirationdate | $KohaDates %][% hold.biblio.title | html %][% hold.item.barcode | html %] [% Branches.GetName( hold.branchcode ) | html %] [% IF hold.suspend == 0 %]No[% ELSE %]Yes[% END %] [% hold.suspend_until | $KohaDates %]