Bug 31635

Summary: Empty title for current result in OPAC results browser's tooltip on paging
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: lucas, pablo.bianchi
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
22.11.00
Circulation function:
Attachments: Bug 31635: Fix output of current title in OPAC browse results
Bug 31635: Fix output of current title in OPAC browse results
Bug 31635: Fix output of current title in OPAC browse results

Description Caroline Cyr La Rose 2022-09-27 15:46:24 UTC
This is very minor, but I noticed it when working on bug 31634. When using OpacBrowseResults, there are result number buttons at the top of the results browser. If you hover over those result numbers, it says 'View record "[title]"'. But if you hover over the current result number, it only says 'View record ""' (with nothing between the double quotes).

To test:
1. Make sure OpacBrowseResults is enabled
1.1. In Koha staff interface, go to Administration > Global system preferences
1.2. Search for OpacBrowseResults
1.3. If necessary, change to 'enable' and click 'Save all OPAC preferences'

2. In OPAC, search for a term that will give you a couple of results and view the results browser 
2.1. In Koha OPAC, search for BFF
2.2. Click on one of the titles to access the opac-detail page
3.3. Click 'Browse results'
3.4. Hover over the number buttons at the top of the results browser
--> When you hover over another result, it says 'View record "[title]"' -- OK
--> When you hover over the current result, it says 'View record ""' -- should say the title
Comment 1 Caroline Cyr La Rose 2022-09-27 15:46:52 UTC
I think it has to do with the fact that the other results are "listitems" of "listResults" whereas the current result is not one of those listitems.

I had a similar problem when trying to work out how to solve bug 31634, I was able to add the part_number and part_name for the current result, but I had to do some acrobatics to add them for the other results.
Comment 2 Owen Leonard 2022-10-04 11:41:30 UTC
Created attachment 141301 [details] [review]
Bug 31635: Fix output of current title in OPAC browse results

This patch makes a correction to the output of OPAC browse results. In
the numbered result navigation links, a title tag on each
navigation link should contain the title of the record. The link for the
current title didn't include the title information in the title tag
because it used the wrong template variables.

To test, apply the patch and make sure OpacBrowseResults is enabled.

- In OPAC, perform a search that will return multiple results.
- View one of the results.
- In the right-hand sidebar, click "Browse results."
- In the list of numbered links at the top of the panel, hover your
  mouse over each link. They should each display a tooltip with  "View
  record [title]"
- Confirm that the current title in the list includes the correct
  tooltip.
Comment 3 Lucas Gass (lukeg) 2022-10-04 22:53:10 UTC
Created attachment 141332 [details] [review]
Bug 31635: Fix output of current title in OPAC browse results

This patch makes a correction to the output of OPAC browse results. In
the numbered result navigation links, a title tag on each
navigation link should contain the title of the record. The link for the
current title didn't include the title information in the title tag
because it used the wrong template variables.

To test, apply the patch and make sure OpacBrowseResults is enabled.

- In OPAC, perform a search that will return multiple results.
- View one of the results.
- In the right-hand sidebar, click "Browse results."
- In the list of numbered links at the top of the panel, hover your
  mouse over each link. They should each display a tooltip with  "View
  record [title]"
- Confirm that the current title in the list includes the correct
  tooltip.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Katrin Fischer 2022-10-07 21:53:50 UTC
Created attachment 141532 [details] [review]
Bug 31635: Fix output of current title in OPAC browse results

This patch makes a correction to the output of OPAC browse results. In
the numbered result navigation links, a title tag on each
navigation link should contain the title of the record. The link for the
current title didn't include the title information in the title tag
because it used the wrong template variables.

To test, apply the patch and make sure OpacBrowseResults is enabled.

- In OPAC, perform a search that will return multiple results.
- View one of the results.
- In the right-hand sidebar, click "Browse results."
- In the list of numbered links at the top of the panel, hover your
  mouse over each link. They should each display a tooltip with  "View
  record [title]"
- Confirm that the current title in the list includes the correct
  tooltip.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Tomás Cohen Arazi (tcohen) 2022-10-12 12:46:57 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 6 Pablo AB 2022-12-29 17:20:46 UTC
Will be backported to 22.05?