From 54a1d110932fc019bbd30726373c028a4abf3d4f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 29 Mar 2022 11:48:42 +0000 Subject: [PATCH] Bug 30396: Convert basket groups page tabs to Bootstrap This patch replaces the use of jQueryUI tabs on the basket groups page, in the view where open and closed basket groups are displayed in separate tabs. This patch includes indentation changes, so please ignore whitespace when using your preferred diff tool. To test you should have at least two basket groups set up in Acquisitions, one open and one closed. Go to Acquisitions -> Vendor -> Basket groups and confirm that the "Open" and "Closed" tabs look correct and work correctly. Under the "Closed" tab, try clicking the "Reopen" button. The page will refresh but you should still see the "Closed" tab active. Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer Signed-off-by: Fridolin Somers --- .../prog/en/modules/acqui/basketgroup.tt | 169 +++++++++--------- 1 file changed, 86 insertions(+), 83 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 7bf2c17cc7..a7e2a33783 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -106,8 +106,11 @@ fieldset.various li { } $(document).ready(function() { - $("#basket_groups").tabs(); - + [% IF ( listclosed) %] + $("#basket_groups a[href='#closed']").tab("show"); + [% ELSE %] + $("#basket_groups a[href='#opened']").tab("show"); + [% END %] $("table").dataTable($.extend(true, {}, dataTablesDefaults, { "aoColumnDefs": [ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, @@ -325,94 +328,94 @@ fieldset.various li {

Basket grouping for [% booksellername | html %]

[% IF (NoEDIMessage) %]
No EDIFACT configuration for [% booksellername | html %]
[% END %]
-
    - [% UNLESS ( listclosed) %]
  • Open
  • - [% ELSE%]
  • Open
  • [% END %] - [% IF ( listclosed) %]
  • Closed
  • - [% ELSE %]
  • Closed
  • [% END %] + -
    - - - - - - - - - - - - - [% FOREACH basketgroup IN basketgroups %] - [% UNLESS ( basketgroup.closed ) %] - - - - - - - - - [% END %] - [% END %] - -
    NameNumberBilling placeDelivery placeNumber of basketsAction
    [% 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 %] - -
    - [% UNLESS basketgroup.basketsqty %] -
    - [% END %] -
    -
    -
    - - - - - - - - - - - - - [% FOREACH basketgroup IN basketgroups %] - [% IF ( basketgroup.closed ) %] - - +
    NameNumberBilling placeDelivery placeNumber of basketsAction
    - [% IF ( basketgroup.name ) %] +
    +
    + + + + + + + + + + + + + [% FOREACH basketgroup IN basketgroups %] + [% UNLESS ( basketgroup.closed ) %] + + - - - - - + + + + + + [% END %] - - [% END %] - [% END %] - -
    NameNumberBilling placeDelivery placeNumber of basketsAction
    [% 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 %] -
    -
    -
    -
    - [% IF (ediaccount) %] -
    - [% ELSE %] -
    No EDIFACT configuration for [% booksellername | html %]
    +
    [% basketgroup.id | html %][% Branches.GetName( basketgroup.billingplace ) | html %][% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %][% basketgroup.basketsqty | html %] + +
    + [% UNLESS basketgroup.basketsqty %] +
    + [% END %] +
    +
    +
    +
    + + + + + + + + + + + + + [% FOREACH basketgroup IN basketgroups %] + [% IF ( basketgroup.closed ) %] + + + + + + + + + [% END %] + [% END %] + +
    NameNumberBilling placeDelivery placeNumber of basketsAction
    + [% 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 %] +
    +
    +
    +
    + [% IF (ediaccount) %] +
    + [% ELSE %] +
    No EDIFACT configuration for [% booksellername | html %]
    + [% END %] +
    +
[% END %] -- 2.39.5