From 058a09b7d9791c16f89f6891d6be9b56432a09f5 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 6 Jun 2024 16:17:36 +0000 Subject: [PATCH] Bug 37046: Use template wrapper for OPAC curbside pickup tabs This patch updates the OPAC curbside pickups template to use WRAPPERs for the Bootstrap tabs markup. To test, apply the patch and enable the "CurbsidePickup" system preference if necessary. - Log in to the OPAC and click the "Curbside pickups" tab in the sidebar of the user summary page. - With no curbside pickup policy defined, you shoul see a single tab, "Your pickups" and the message "No curbside pickups." - In the staff interface go to Administration -> Curbside pickup. - Configure curbside pickups for at least one branch. - Return to the OPAC and refresh the curbside pickups page. - You should now see a "Schedule a pickup" tab along with the "Your pickups" tab, and it should be active by default. - Schedule a pickup. - When the page refreshes, the "Your pickups" tab should now be active by default. Sponsored-By: Athens County Public Libraries Signed-off-by: David Nind Signed-off-by: Katrin Fischer --- .../en/modules/opac-curbside-pickups.tt | 51 +++++++++---------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt index 3f00811146..0553537692 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt @@ -138,33 +138,31 @@ [% END %] -
- + [% END # /WRAPPER tabs_nav %] -
+ [% WRAPPER tab_panels %] [% IF patron_curbside_pickups.count %] -
- [% ELSE %] -
+ [% SET pickups_active = 1 %] [% END %] + [% WRAPPER tab_panel tabname="user-pickups" bt_active= pickups_active %] [% IF patron_curbside_pickups.count %] @@ -216,14 +214,13 @@ [% ELSE %]
No curbside pickups.
[% END %] - + [% END # /tab_panel %] [% IF policies.count %] [% IF patron_curbside_pickups.count %] -
- [% ELSE %] -
+ [% SET scheduled_active = "" %] [% END %] + [% WRAPPER tab_panel tabname="user-schedule-pickup" bt_active= scheduled_active %]
[% INCLUDE 'csrf-token.inc' %]
@@ -260,11 +257,11 @@
-
- [% END %] -
- - + [% END # /tab_panel %] + [% END # /IF policies.count %] + [% END # /WRAPPER tab_panels %] + [% END # /WRAPPER tabs %] + -- 2.39.5