Summary: | Curbside pickups tab not selected in OPAC | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Templates | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | Pushed to stable --- | QA Contact: | Paul Derscheid <paul.derscheid> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, oleonard, paul.derscheid, tomascohen |
Version: | Main | Keywords: | rel_24_05_candidate, rel_24_11_candidate |
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
25.05.00,24.11.02
|
|
Circulation function: | |||
Attachments: |
Bug 38813: Make the 'curbside pickups' tab display selected if so
Bug 38813: Make the 'curbside pickups' tab display selected if so [24.05.x] Bug 38813: Make inner tabs selected correctly Bug 38813: Make the 'curbside pickups' tab display selected if so |
Description
Tomás Cohen Arazi (tcohen)
2025-01-02 17:45:12 UTC
Created attachment 176098 [details] [review] 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> I've checked this patch also works on 24.11 and 24.05. Created attachment 176101 [details] [review] 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> Created attachment 176106 [details] [review] [24.05.x] Bug 38813: Make inner tabs selected correctly On the 24.05.x branch (i.e. before the tab wrapper) the template logic is making it not select the first tab if there are no policies defined. To test: 1. Have KTD running on 24.05.x 2. Enable the `CurbsidePickups` system preference 3. Define a policy (anyone), DISABLED 4. Log into the OPAC and point your browser to <koha>/cgi-bin/koha/opac-curbside-pickups.pl => FAIL: The 'Your pickups' tab is grey (not selected) and there's no content below it 5. ENABLE the policy and reload the OPAC => SUCCESS: Notice it gives you the option to 'Schedule a pickup', selected by default. 6. Apply this patch 7. Repeat 5 => SUCCESS: No behavior change 8. Repeat 3-4 => SUCCESS: The 'Your pickups' tab is selected, and the 'No curbside pickups' message displayed 9. Sign off :-D Thanks Lucas, I've added a small follow-up that is 24.05 only. Maybe 23.11. Created attachment 176836 [details] [review] 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> Pushed for 25.05! Well done everyone, thank you! Nice work everyone! Pushed to 24.11.x for 24.11.02 |