Bugzilla – Attachment 170912 Details for
Bug 37046
Use template wrapper for OPAC curbside pickup tabs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37046: Use template wrapper for OPAC curbside pickup tabs
Bug-37046-Use-template-wrapper-for-OPAC-curbside-p.patch (text/plain), 6.85 KB, created by
Owen Leonard
on 2024-08-30 14:24:38 UTC
(
hide
)
Description:
Bug 37046: Use template wrapper for OPAC curbside pickup tabs
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-08-30 14:24:38 UTC
Size:
6.85 KB
patch
obsolete
>From c3f7f73762e843193866e7675bcda69155da684b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <david@davidnind.com> >--- > .../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 @@ > </div> > [% END %] > >- <div id="opac-pickups-views" class="toptabs"> >- <ul class="nav nav-tabs" role="tablist"> >- <li class="nav-item" role="presentation" id="tab-user-pickups"> >- [% IF patron_curbside_pickups.count %] >- <a href="#user-pickups" class="nav-link active" aria-controls="user-pickups" aria-selected="true" role="tab" data-bs-toggle="tab">Your pickups</a> >- [% ELSE %] >- <a href="#user-pickups" class="nav-link" aria-controls="user-pickups" role="tab" data-bs-toggle="tab">Your pickups</a> >+ [% WRAPPER tabs id= "opac-pickups-views" %] >+ [% WRAPPER tabs_nav %] >+ [% IF patron_curbside_pickups.count || !policies.count %] >+ [% SET pickups_active = 1 %] >+ [% END %] >+ [% WRAPPER tab_item tabname= "user-pickups" bt_active= pickups_active %] >+ <span>Your pickups</span> > [% END %] >- </li> >- > [% IF policies.count %] >- <li class="nav-item" role="presentation" id="tab-user-schedule-pickup"> > [% IF patron_curbside_pickups.count %] >- <a href="#user-schedule-pickup" class="nav-link" aria-controls="user-schedule-pickup" role="tab" data-bs-toggle="tab">Schedule a pickup</a> >+ [% SET scheduled_active = "" %] > [% ELSE %] >- <a href="#user-schedule-pickup" class="nav-link active" aria-controls="user-schedule-pickup" aria-selected="true" role="tab" data-bs-toggle="tab">Schedule a pickup</a> >+ [% SET scheduled_active = 1 %] >+ [% END %] >+ [% WRAPPER tab_item tabname= "user-schedule-pickup" bt_active= scheduled_active %] >+ <span>Schedule a pickup</span> > [% END %] >- </li> > [% END %] >- </ul> >+ [% END # /WRAPPER tabs_nav %] > >- <div class="tab-content"> >+ [% WRAPPER tab_panels %] > [% IF patron_curbside_pickups.count %] >- <div role="tabpanel" class="tab-pane active" id="user-pickups" aria-labelledby="tab-user-pickups"> >- [% ELSE %] >- <div role="tabpanel" class="tab-pane" id="user-pickups" aria-labelledby="tab-user-pickups"> >+ [% SET pickups_active = 1 %] > [% END %] >+ [% WRAPPER tab_panel tabname="user-pickups" bt_active= pickups_active %] > [% IF patron_curbside_pickups.count %] > <table id="pickups-table" class="table table-striped"> > <thead> >@@ -216,14 +214,13 @@ > [% ELSE %] > <div>No curbside pickups.</div> > [% END %] >- </div> >+ [% END # /tab_panel %] > > [% IF policies.count %] > [% IF patron_curbside_pickups.count %] >- <div role="tabpanel" class="tab-pane" id="user-schedule-pickup" aria-labelledby="tab-user-schedule-pickup"> >- [% ELSE %] >- <div role="tabpanel" class="tab-pane active" id="user-schedule-pickup" aria-labelledby="tab-user-schedule-pickup"> >+ [% SET scheduled_active = "" %] > [% END %] >+ [% WRAPPER tab_panel tabname="user-schedule-pickup" bt_active= scheduled_active %] > <form id="create-pickup" method="post"> > [% INCLUDE 'csrf-token.inc' %] > <fieldset class="rows"> >@@ -260,11 +257,11 @@ > <input type="submit" id="schedule-pickup-button" class="btn btn-default" disabled value="Schedule pickup" /> > </fieldset> > </form> >- </div> >- [% END %] >- </div> >- </div> >- </div> >+ [% END # /tab_panel %] >+ [% END # /IF policies.count %] >+ [% END # /WRAPPER tab_panels %] >+ [% END # /WRAPPER tabs %] >+ </div> <!-- /#pickupdetails --> > </div> <!-- / .col-lg-10 --> > </div> <!-- / .row --> > </div> <!-- / .container-fluid --> >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37046
:
167553
|
167557
|
170660
| 170912