Bug 34573

Summary: Inconsistencies in acquisitions modify vendor title tag
Product: Koha Reporter: Andrew Auld <andrew.auld>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: Pushed to main --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: trivial    
Priority: P5 - low CC: david, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes page title, breadcrumb, and browser page title inconsistencies when adding and modifying vendor details in acquisitions.
Version(s) released in:
24.11.00
Attachments: Bug 34573: Fix inconsistencies in acquisitions modify vendor title tag
Bug 34573: Fix inconsistencies in acquisitions modify vendor title tag
Bug 34573: (follow-up) Additional updates for modify vendor page
Bug 34573: Fix inconsistencies in acquisitions modify vendor title tag
Bug 34573: (follow-up) Additional updates for modify vendor page
Bug 34573: (follow-up) Add better logic for add/update title and headers

Description Andrew Auld 2023-08-18 08:29:22 UTC
When checking bug #33908 I noticed that the title tag for 'My Vendor > Modify My Vendor' doesn't include 'Modify My Vendor'. It is the same as the title tag for the 'My Vendor' page.
Comment 1 Katrin Fischer 2023-10-29 11:50:20 UTC
It looks like this is still the case.
Comment 2 Owen Leonard 2023-11-21 13:53:07 UTC Comment hidden (obsolete)
Comment 3 David Nind 2023-11-21 23:13:51 UTC Comment hidden (obsolete)
Comment 4 David Nind 2023-11-21 23:13:54 UTC Comment hidden (obsolete)
Comment 5 David Nind 2023-11-21 23:15:49 UTC
Testing notes (using KTD) - see item 3 for additional changes made in a follow-up patch:

1. Page for a vendor
~~~~~~~~~~~~~~~~~~~~

Browser page title
- Before: Vendor My Vendor > Koha
- After: Vendor My Vendor > Acquisitions > Koha (Acquisitions added)

Breadcrumb:
- Before: Acquisitions > My Vendor 
- After: Acquisitions > My Vendor (no change)

Page title
- Before:  My Vendor
- After: My Vendor (no change)

2. Page for editing a vendor
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Browser page title:
- Browser page tite: Vendor My Vendor > Koha
- After: Modify vendor My Vendor > Acquisitions > Koha (Modify added at the start, Acquisitions added)

Breadcrumb:
- Breadcrumb: Acquisitions > My Vendor > Modify My Vendor
- After: Acquisitions > My Vendor > Modify vendor My Vendor (vendor added)

Page title:
- Page title: Update: My Vendor
- After: Update: My Vendor (no change)


3. Additional changes added in follow-up patch for editing a vendor
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I've made some additional changes to the edit vendor page - feel free to obsolete patch if I've got the patter wrong!

Browser page title:
- Browser page tite: Modify vendor My Vendor > Acquisitions > Koha (Bug 34573: Modify added at the start, Acquisitions added)
- After: Modify vendor 'My Vendor' > Acquisitions > Koha (add single quotes around vendor name)

Breadcrumb:
- Breadcrumb: Acquisitions > My Vendor > Modify vendor My Vendor (Bug 34573: vendor added)
- After: Acquisitions > My Vendor > Modify vendor 'My Vendor' (add single quotes around vendor name)

Page for editing a vendor:
- Page title: Update: My Vendor
- After: Modify vendor 'My Vendor' (text before changed, added single quotes around vendor name)
Comment 6 Marcel de Rooy 2023-11-24 09:27:06 UTC
QA: String changes!
Comment 7 Marcel de Rooy 2023-12-01 10:21:08 UTC
Created attachment 159435 [details] [review]
Bug 34573: Fix inconsistencies in acquisitions modify vendor title tag

This patch updates the vendor details template so that the title tag
correctly reflects whether the user is viewing the vendor or modifying
it.

To test, apply the patch and go to Acquisitions.

- Locate a vendor and view the details (supplier.pl?booksellerid=X)
  - The title should read "Vendor X > Acquisitions > Koha"
- Edit the vendor.
  - The title should read "Modify vendor X > Acquisitions > Koha"

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Marcel de Rooy 2023-12-01 10:21:10 UTC
Created attachment 159436 [details] [review]
Bug 34573: (follow-up) Additional updates for modify vendor page

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Katrin Fischer 2023-12-07 09:50:15 UTC
I found some oddness here: When adding a new vendor, the title tag reads: "Modify vendor ''".
Comment 10 David Nind 2023-12-07 20:26:18 UTC
I thought I might have caused it, but it is something to do with line 150 (after the patches are applied) - that text appears in the HTML page title if you add a new vendor or modify an existing vendor.

I don't understand how it works enough to fix it 8-(.
Comment 11 Owen Leonard 2024-06-06 12:55:57 UTC
Created attachment 167540 [details] [review]
Bug 34573: (follow-up) Add better logic for add/update title and headers
Comment 12 Martin Renvoize 2024-06-13 13:32:40 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant