Bug 37004 - Staff search results: Add a HTML class ( branchcode ) to each item entry in the results list
Summary: Staff search results: Add a HTML class ( branchcode ) to each item entry in t...
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on: 37005
Blocks: 37006
  Show dependency treegraph
 
Reported: 2024-05-31 21:08 UTC by Lucas Gass
Modified: 2024-09-02 10:21 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 37004: Add branchcode as HTML class to each grouped result in search results (5.74 KB, patch)
2024-05-31 21:18 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 37004: Add branchcode as HTML class to each grouped result in search results (5.79 KB, patch)
2024-06-01 20:59 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2024-05-31 21:08:42 UTC
I would like to add the proper branchcode as an HTML class to each <li> item in the staff search results. 

There are three possible <ul>'s here:

-onloan_items_loop_items
-available_items_loop_items
-other_items_loop_items


Having the correct branch code here will make it much easier to write CSS/JS customization for a particular branch.
Comment 1 Lucas Gass 2024-05-31 21:18:29 UTC
Created attachment 167317 [details] [review]
Bug 37004: Add branchcode as HTML class to each grouped result in search results

To test:
1. Apply patch and restart_all
2. Do a catalog search that returns results.
3. Using the browsers dev tools inscpet the page and look for the 'available_items_loop_items' class in the 'Location column'.
4. Each child <li> element should have a class that is the branchcode.
5. Make sure that branchcode is correct.
6. Change the StaffSearchResultsDisplayBranch system preference. Make sure that each branchcode is still correct.
7. Change the system preference 'noItemTypeImages' to 'Dont show'.
8. Make sure the branchcode is still correct.
9. Checkout an item that would show up in these search results.
10. Do steps 3-8 again excpet this time look for the HTML element 'onloan_items_loop_items'.
11. Put some items in transfer that would show up in these search resultss.
12. Do steps 3-8 again excpet this time look for the HTML element 'other_items_loop_items'.
Comment 2 David Nind 2024-06-01 20:59:49 UTC
Created attachment 167322 [details] [review]
Bug 37004: Add branchcode as HTML class to each grouped result in search results

To test:
1. Apply patch and restart_all
2. Do a catalog search that returns results.
3. Using the browsers dev tools inscpet the page and look for the 'available_items_loop_items' class in the 'Location column'.
4. Each child <li> element should have a class that is the branchcode.
5. Make sure that branchcode is correct.
6. Change the StaffSearchResultsDisplayBranch system preference. Make sure that each branchcode is still correct.
7. Change the system preference 'noItemTypeImages' to 'Dont show'.
8. Make sure the branchcode is still correct.
9. Checkout an item that would show up in these search results.
10. Do steps 3-8 again excpet this time look for the HTML element 'onloan_items_loop_items'.
11. Put some items in transfer that would show up in these search resultss.
12. Do steps 3-8 again excpet this time look for the HTML element 'other_items_loop_items'.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2024-09-02 08:39:52 UTC
QA'd by RM
Comment 4 Katrin Fischer 2024-09-02 10:21:18 UTC
Pushed for 24.11!

Well done everyone, thank you!