Bug 23648

Summary: The logged in link (class "loggedinusername") needs data-patroncategory
Product: Koha Reporter: Christopher Brannon <cbrannon>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: martin.renvoize
Version: Main   
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:
19.11.00
Circulation function:
Attachments: Bug 23648: The logged in link (class "loggedinusername") needs data-patroncategory
Bug 23648: The logged in link (class "loggedinusername") needs data-patroncategory
Bug 23648: The logged in link (class "loggedinusername") needs data-patroncategory

Description Christopher Brannon 2019-09-19 20:36:04 UTC
Would be helpful to add the patron code in a data-patroncode field.  Particularly, this would be helpful wiht the opac-restrictedpage.pl, where we need to limit patron types to this page.
Comment 1 Katrin Fischer 2019-09-22 11:09:23 UTC
Slightly changing the title - I think code means 'patron category code'? :)
Comment 2 Christopher Brannon 2019-09-22 14:07:30 UTC
(In reply to Katrin Fischer from comment #1)
> Slightly changing the title - I think code means 'patron category code'? :)

Yes.
Comment 3 Owen Leonard 2019-09-25 12:12:32 UTC
Created attachment 93152 [details] [review]
Bug 23648: The logged in link (class "loggedinusername") needs data-patroncategory

This patch adds a "data-categorycode" attribte to the logged in link in
the global header of the OPAC. This will allow access to the patron
category for use in customization and whatnot.

To test, apply the patch and log in to the OPAC. Use the browser's DOM
inspector tool to examine the logged-in user's name in the header. It
should have a "data-categorycode" attribute with the correct value.
Comment 4 ByWater Sandboxes 2019-09-25 15:57:19 UTC
Created attachment 93158 [details] [review]
Bug 23648: The logged in link (class "loggedinusername") needs data-patroncategory

This patch adds a "data-categorycode" attribte to the logged in link in
the global header of the OPAC. This will allow access to the patron
category for use in customization and whatnot.

To test, apply the patch and log in to the OPAC. Use the browser's DOM
inspector tool to examine the logged-in user's name in the header. It
should have a "data-categorycode" attribute with the correct value.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Comment 5 Christopher Brannon 2019-09-25 15:58:09 UTC
Works as described.
Comment 6 Katrin Fischer 2019-09-30 13:28:05 UTC
Created attachment 93252 [details] [review]
Bug 23648: The logged in link (class "loggedinusername") needs data-patroncategory

This patch adds a "data-categorycode" attribte to the logged in link in
the global header of the OPAC. This will allow access to the patron
category for use in customization and whatnot.

To test, apply the patch and log in to the OPAC. Use the browser's DOM
inspector tool to examine the logged-in user's name in the header. It
should have a "data-categorycode" attribute with the correct value.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Martin Renvoize (ashimema) 2019-10-01 07:14:12 UTC
Nice work!

Pushed to master for 19.11.00