From 003020fc4e09d4fc09afbc4b4ea47ad275d343aa Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 9 Feb 2026 06:43:10 -0500 Subject: [PATCH] Bug 41803: Improvements to consistency in basket groups template This patch makes some updates to the basket groups template: - Buttons in a table's "actions" column should have the class "btn btn-default btn-xs" - Adding icons to action buttons - Group export options (CSV and PDF) under button dropdown - Use class instead of ID as hook for closing and deleting basket groups. This prevents duplicate element IDs on the page. - When there is no EDIFACT configuration, disable the "Generate EDIFACT order" button and put the error message in a tooltip. - Style warning message as Bootstrap alert To test, apply the patch and go to Acquisitions and locate a vendor. - View the vendor details. - Click "Basket groups" in the sidebar. - Create multiple basket groups if necessary. - Test various operations in the list of open groups: - Close and export PDF - Edit - Delete - Test the actions for a closed basket group: - Reopen - Export -> CSV and Export -> PDF - Enable the EDIFACT system preference but do not add any EDI accounts. - Under the "Closed" basket group tab the "Generate EDIFACT order" buttons should be disabled, and hovering over each one should trigger a popup warning that there is no EDIFACT configuration for the vendor. Sponsored-by: Athens County Public Libraries --- .../prog/en/modules/acqui/basketgroup.tt | 93 ++++++++++--------- 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt index caa57b1f9ec..8121f24391a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -254,7 +254,7 @@ >

Basket grouping for [% booksellername | html %]

- [% IF (NoEDIMessage && Koha.Preference('EDIFACT')) %]
No EDIFACT configuration for [% booksellername | html %]
[% END %] + [% IF (NoEDIMessage && Koha.Preference('EDIFACT')) %]
No EDIFACT configuration for [% booksellername | html %]
[% END %] [% WRAPPER tabs id= "basket_groups" %] [% WRAPPER tabs_nav %] @@ -289,20 +289,22 @@ [% Branches.GetName( basketgroup.billingplace ) | html %] [% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %] [% basketgroup.basketsqty | html %] - - + +
- +
[% UNLESS basketgroup.basketsqty %]
- + [% INCLUDE 'csrf-token.inc' %]
[% END %] @@ -331,55 +333,58 @@ [% IF ( basketgroup.closed ) %] - [% IF ( basketgroup.name ) %] - [% basketgroup.name | html %] - [% ELSE %] - Basket group no. [% basketgroup.id | html %] - [% END %] + + [% IF ( basketgroup.name ) %] + [% basketgroup.name | html %] + [% ELSE %] + Basket group no. [% basketgroup.id | html %] + [% END %] + [% basketgroup.id | html %] [% Branches.GetName( basketgroup.billingplace ) | html %] [% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %] [% basketgroup.basketsqty | html %] - -
-
+ + + + + + [% INCLUDE 'csrf-token.inc' %]
-
-
+
+ + +
[% IF Koha.Preference('EDIFACT') %] [% IF (ediaccount) %] -
+ + + + + [% INCLUDE 'csrf-token.inc' %]
[% ELSE %] -
No EDIFACT configuration for [% booksellername | html %]
+ [% END %] [% END %] @@ -471,7 +476,7 @@ } }); - $("#close_and_print").on("click", function(e){ + $(".close_and_print").on("click", function(e){ e.preventDefault(); const basketgroupid = $(this).data("basketgroupid"); closeandprint( basketgroupid ); @@ -482,7 +487,7 @@ submitForm(this); }); - $("#delete_basketgroup").on("click", function(e){ + $(".delete_basketgroup").on("click", function(e){ return confirm(_("Are you sure you want to delete this basket group?")); }); }); -- 2.39.5