It would be useful when customizing Koha if we could easily know what the category code of the logged in user.
Created attachment 159380 [details] [review] Bug 35444: Add hidden span with information about the loggedinuser categorycode To test: 1. APPLY PATCH 2. Log into the staff interface and use the browser's dev tools to look for the HTML class 'loggedincategorycode'. It should match the current logged in user's categorycode. 3. You could also use a console.log like so: console.log( $('.loggedincategorycode').text() );
That could be interesting. Are you thinking mostly in terms of CSS or something else?
Created attachment 159597 [details] [review] Bug 35444: Add hidden span with information about the loggedinuser categorycode To test: 1. APPLY PATCH 2. Log into the staff interface and use the browser's dev tools to look for the HTML class 'loggedincategorycode'. It should match the current logged in user's categorycode. 3. You could also use a console.log like so: console.log( $('.loggedincategorycode').text() ); Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 161454 [details] [review] Bug 35444: Add hidden span with information about the loggedinuser categorycode To test: 1. APPLY PATCH 2. Log into the staff interface and use the browser's dev tools to look for the HTML class 'loggedincategorycode'. It should match the current logged in user's categorycode. 3. You could also use a console.log like so: console.log( $('.loggedincategorycode').text() ); Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Trivial change, QA script happy. Passing QA.
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.06 Very useful :D
Sometimes, I think that we should create an API to provide information about the logged in user...
Enhancement won't be backported to 23.05.x