Bug 34835

Summary: Highlight logged-in library in patron searches does not work anymore in new staff interface
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: TemplatesAssignee: Fridolin Somers <fridolin.somers>
Status: Pushed to oldstable --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, jonathan.druart, oleonard
Version: MainKeywords: regression
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:
23.11.00,23.05.04,22.11.11
Bug Depends on: 30952    
Bug Blocks:    
Attachments: Bug 34835: Highlight logged-in library in patron searches fix for new staff interface
Bug 34835: Highlight logged-in library in patron searches fix for new staff interface
Bug 34835: Highlight logged-in library in patron searches fix for new staff interface

Description Fridolin Somers 2023-09-19 22:17:47 UTC
Since Bug 30952 the feature from Bug 10902 does not work anymore.
The class "currentlibrary" is there but no background color in CSS.
Bug 30952 removed it :
-    background-color: #E6FCB7;
Comment 1 Fridolin Somers 2023-09-19 22:24:54 UTC
Created attachment 155917 [details] [review]
Bug 34835: Highlight logged-in library in patron searches fix for new staff interface

Since Bug 30952 the feature from Bug 10902 does not work anymore.
The class "currentlibrary" is there but no background color in CSS.
Bug 30952 removed it :
-    background-color: #E6FCB7;

This patch restores this rule plus '!important' that is used by
class 'ac-currentlibrary'

Test plan:
1) Perform a patrons search
2) Check you see green background color for patrons with same branch as
   currently logged in.
Comment 2 David Nind 2023-09-20 00:56:16 UTC
Created attachment 155918 [details] [review]
Bug 34835: Highlight logged-in library in patron searches fix for new staff interface

Since Bug 30952 the feature from Bug 10902 does not work anymore.
The class "currentlibrary" is there but no background color in CSS.
Bug 30952 removed it :
-    background-color: #E6FCB7;

This patch restores this rule plus '!important' that is used by
class 'ac-currentlibrary'

Test plan:
1) Perform a patrons search
2) Check you see green background color for patrons with same branch as
   currently logged in.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2023-09-20 00:57:29 UTC
Testing notes (using KTD):

1. yarn build after applying the patch (I think this is required).

2. Search results in table now highlights the library name if it matches the current selected library.
Comment 4 Jonathan Druart 2023-09-20 06:47:29 UTC
Shouldn't we remove the padding?
Comment 5 Jonathan Druart 2023-09-20 06:57:03 UTC
Hum I thought we fixed that already (years ago?), but I don't find the bug.
Comment 6 Jonathan Druart 2023-09-20 06:57:28 UTC
Created attachment 155922 [details] [review]
Bug 34835: Highlight logged-in library in patron searches fix for new staff interface

Since Bug 30952 the feature from Bug 10902 does not work anymore.
The class "currentlibrary" is there but no background color in CSS.
Bug 30952 removed it :
-    background-color: #E6FCB7;

This patch restores this rule plus '!important' that is used by
class 'ac-currentlibrary'

Test plan:
1) Perform a patrons search
2) Check you see green background color for patrons with same branch as
   currently logged in.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Tomás Cohen Arazi 2023-09-22 15:39:22 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 8 Fridolin Somers 2023-09-22 20:31:51 UTC
Pushed to 23.05.x for 23.05.04
Comment 9 Jacob O'Mara 2023-10-17 11:45:21 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x