Bugzilla – Attachment 176836 Details for
Bug 38813
Curbside pickups tab not selected in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38813: Make the 'curbside pickups' tab display selected if so
Bug-38813-Make-the-curbside-pickups-tab-display-se.patch (text/plain), 2.91 KB, created by
Paul Derscheid
on 2025-01-20 17:38:27 UTC
(
hide
)
Description:
Bug 38813: Make the 'curbside pickups' tab display selected if so
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2025-01-20 17:38:27 UTC
Size:
2.91 KB
patch
obsolete
>From 53311cb8fcb35ff9be281cd921e521c2bc55257b Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 2 Jan 2025 14:46:13 -0300 >Subject: [PATCH] Bug 38813: Make the 'curbside pickups' tab display selected > if so > >This patch fixes a wrong condition check in `usermenu.inc` for >determining if the tab should be active. > >It currently checks for `ermview`, probably a copy and paste error. > >This patch adds a new `curbside_pickups_view` parameter that is passed >instead. > >Note: I tidied the code block I changed, inline to avoid extra commits. > >To test: >1. Enable the `CurbsidePickup` system preference >2. Log into the OPAC >=> SUCCESS: There's a 'Curbside pickups' tab >3. Click on the tab >=> SUCCESS: The 'Curbside pickups' section gets displayed >=> FAIL: The tab remains inactive >4. Apply this patch >5. Restart plack: > $ ktd --shell > k$ koha-plack --restart kohadev >6. Repeat 3 >=> SUCCESS: The 'Curbside pickups' section gets displayed >=> SUCCESS: The tab is rendered as active >7. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> >--- > .../opac-tmpl/bootstrap/en/includes/usermenu.inc | 2 +- > opac/opac-curbside-pickups.pl | 11 ++++------- > 2 files changed, 5 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >index d088f48ab7..828e1398f7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >@@ -150,7 +150,7 @@ > [% END %] > > [% IF Koha.Preference( 'CurbsidePickup' ) %] >- [% IF ( ermview ) %] >+ [% IF ( curbside_pickups_view ) %] > <li class="active"> > [% ELSE %] > <li> >diff --git a/opac/opac-curbside-pickups.pl b/opac/opac-curbside-pickups.pl >index 13450a0744..0486a4433f 100755 >--- a/opac/opac-curbside-pickups.pl >+++ b/opac/opac-curbside-pickups.pl >@@ -134,18 +134,15 @@ $template->param( > ), > patron_curbside_pickups => Koha::CurbsidePickups->search( > { >- borrowernumber => $logged_in_patron->borrowernumber, >+ borrowernumber => $logged_in_patron->borrowernumber, > }, >- { >- order_by => { -asc => 'scheduled_pickup_datetime' } >- } >+ { order_by => { -asc => 'scheduled_pickup_datetime' } } > )->filter_by_scheduled_today, > curbside_pickups => Koha::CurbsidePickups->search( > {}, >- { >- order_by => { -asc => 'scheduled_pickup_datetime' } >- } >+ { order_by => { -asc => 'scheduled_pickup_datetime' } } > )->filter_by_scheduled_today, >+ curbside_pickups_view => 1, > ); > > output_html_with_http_headers $input, $cookie, $template->output, undef, >-- >2.39.5
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 38813
:
176098
|
176101
|
176106
| 176836