From 89241633afa1f4f8750bfe0c22eac3c7620ae1e6 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 9 Jul 2025 19:51:33 +0000 Subject: [PATCH] Bug 36135: (follow-up) Fix suspension search and other improvements This patch tries to fix the hold suspension search by copying the code from the expiration date search function. The patch also makes these changes: - Change page title to use i18n functions - Add specific breadcrumb for results page - Update headings between search and results page - Correct table settings (definition was missing from columns_settings.yml - Correct capitalization (e.g. "Pickup location" instead of "Pickup Location" - Use include files for displaying title and patron in update results - Add subtitle and medium to title in search results - Remove quotes from DataTables option names - Add hold date to the search results view. - Without a specified default sort, the table will sort the first column. Since the first column is checkboxes, we ought to explicitly set a default sorting column. I thought hold date seemed like a better default than title. Signed-off-by: Jason Robb --- admin/columns_settings.yml | 55 +++++++------ .../en/modules/tools/batch_modify_holds.tt | 81 ++++++++++++------- 2 files changed, 84 insertions(+), 52 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 0e95c12999b..0aa17cb1760 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -1992,31 +1992,7 @@ modules: columnname: suspend - columnname: print_slip - holds_to_modify: - default_display_length: 20 - columns: - - - columnname: checkbox - cannot_be_toggled: 1 - cannot_be_modified: 1 - - - columnname: expiration_date - - - columnname: title - - - columnname: barcode - - - columnname: patron - - - columnname: status - - - columnname: pickup_library - - - columnname: suspended - - - columnname: suspended_until - - - columnname: notes + modified_holds: default_display_length: 20 columns: @@ -2469,6 +2445,35 @@ modules: - columnname: batch_patron_edit_debarredcomment + batch_hold_modification: + holds_to_modify: + default_display_length: 20 + columns: + - + columnname: batch_hold_edit_selections + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: batch_hold_edit_hold_date + - + columnname: batch_hold_edit_expiration_date + - + columnname: batch_hold_edit_title + - + columnname: batch_hold_edit_barcode + - + columnname: batch_hold_edit_patron + - + columnname: batch_hold_edit_status + - + columnname: batch_hold_edit_hold_pickup_library + - + columnname: batch_hold_edit_suspended + - + columnname: batch_hold_edit_suspended_until + - + columnname: batch_hold_edit_note + logviewer: logst: default_display_length: 20 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 4850a8a01a3..21953f3faeb 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 @@ -8,9 +8,11 @@ [% USE TablesSettings %] [% USE To %] [% PROCESS 'html_helpers.inc' %] - +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Batch modify holds › Tools › Koha +[% FILTER collapse %] + [% t("Batch modify holds") | html %] › [% t("Tools") | html %] › [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% Asset.css("css/humanmsg.css") | $raw %] @@ -25,12 +27,15 @@ [% WRAPPER breadcrumb_item %] Tools [% END %] - [% IF ( view == 'form' || view == 'report' ) %] + [% IF ( view == 'report' ) %] [% WRAPPER breadcrumb_item %] Batch modify holds [% END %] - [% ELSE %] [% WRAPPER breadcrumb_item bc_active= 1 %] + Modified holds + [% END %] + [% ELSE %] + [% WRAPPER breadcrumb_item %] Batch modify holds [% END %] [% END %] @@ -41,8 +46,8 @@
-

Batch modify holds

[% IF view == "cud-form" %] +

Batch modify holds

[% ELSIF view == "report" %] +

Modified holds

@@ -108,12 +114,12 @@ - + - + - + @@ -121,8 +127,8 @@ [% FOREACH hold IN updated_holds_obj %] - - + + @@ -247,6 +253,7 @@ [% INCLUDE 'calendar.inc' %] [% INCLUDE 'datatables.inc' %] [% INCLUDE 'select2.inc' %] + [% INCLUDE 'js-biblio-format.inc' %] [% INCLUDE 'js-patron-format.inc' %] [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
Title PatronPickup LocationPickup location PriorityExpiration DateExpiration date Status SuspendedSuspended UntilSuspended until Notes
[% hold.biblio.title | html %][% hold.borrower.firstname | html %] [% hold.borrower.surname | html %][% INCLUDE 'biblio-title.inc' biblio=hold.biblio link = 1 %][% INCLUDE 'patron-title.inc' invert_name=1 patron=hold.borrower hide_patron_infos_if_needed=1 link_to="circulation_reserves" %] [% hold.branch.branchname | html %] [% hold.priority | html %] [% hold.expirationdate | $KohaDates %]