Bug 21137

Summary: Replace BORROWER_INFO and USER_INFO with logged_in_user
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: TemplatesAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25770
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 18403, 19291    
Bug Blocks:    
Attachments: Bug 21137: Replace USER_INFO with logged_in_user
Bug 21137: Replace BORROWER_INFO with logged_in_user
Bug 21137: Replace USER_INFO with logged_in_user
Bug 21137: use logged_in_user from opac-user.pl
Bug 21137: Replace BORROWER_INFO with logged_in_user
Bug 21137: Replace USER_INFO with logged_in_user
Bug 21137: use logged_in_user from opac-user.pl
Bug 21137: Replace BORROWER_INFO with logged_in_user
Bug 19291: Make breadcrumbs for OPAC search history consistent with other patron account pages
Bug 21137: Replace USER_INFO with logged_in_user
Bug 21137: use logged_in_user from opac-user.pl
Bug 21137: Replace BORROWER_INFO with logged_in_user
Bug 21137: Replace USER_INFO with logged_in_user
Bug 21137: use logged_in_user from opac-user.pl
Bug 21137: Replace BORROWER_INFO with logged_in_user
Bug 21137: Standardize breadcrumbs for tags page

Description Jonathan Druart 2018-08-01 13:06:48 UTC
We now have a Koha::Patron object sent to the templates, logged_in_user.
It must be used everywhere patron's info are needed.
BORROWER_INFO and USER_INFO can be replaced using it.

See commit d2f2590c894efca417112795e05248dbd16636f5
    Bug 18403: Send logged_in_user to template from C4::Auth
Comment 1 Jonathan Druart 2018-08-01 13:30:23 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2018-08-01 13:30:27 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2018-08-01 13:35:27 UTC
There is no exhaustive test plan here, reading the patch and hitting few opac pages should do the work.
Also try with logged-in patrons
- with a category 'organization'
- with/without title
Comment 4 Jonathan Druart 2018-08-01 14:10:25 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2018-08-01 14:10:29 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2018-08-01 14:10:33 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2018-08-01 16:14:33 UTC
Created attachment 77376 [details] [review]
Bug 21137: Replace USER_INFO with logged_in_user

This patch set does several things:
- it removes USER_INFO and BORROWER_INFO
These 2 variables contained logged-in patron's info. They must be
accessed from logged_in_user
- Use patron-title.inc for the breadcrumb at the OPAC, for consistencies

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 8 Owen Leonard 2018-08-01 16:14:36 UTC
Created attachment 77377 [details] [review]
Bug 21137: use logged_in_user from opac-user.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 9 Owen Leonard 2018-08-01 16:14:41 UTC
Created attachment 77378 [details] [review]
Bug 21137: Replace BORROWER_INFO with logged_in_user

it also removes 'category_type' and 'description' from a couple of
opac scripts, they are not needed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 10 Katrin Fischer 2018-08-01 19:27:42 UTC
Created attachment 77397 [details] [review]
Bug 19291: Make breadcrumbs for OPAC search history consistent with other patron account pages

This patch adds the logged-in patron's name to the search history page's
breadcrumb navigation.

To test, apply the patch and view the OPAC search history page with no
user logged in. The breadcrumbs should read:

- Home ->  Search history

Log in and return to the search history page. The breadcrumbs should
read:

- Home -> Owen Leonard -> Your search history

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2018-08-01 19:27:47 UTC
Created attachment 77398 [details] [review]
Bug 21137: Replace USER_INFO with logged_in_user

This patch set does several things:
- it removes USER_INFO and BORROWER_INFO
These 2 variables contained logged-in patron's info. They must be
accessed from logged_in_user
- Use patron-title.inc for the breadcrumb at the OPAC, for consistencies

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2018-08-01 19:27:51 UTC
Created attachment 77399 [details] [review]
Bug 21137: use logged_in_user from opac-user.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2018-08-01 19:27:56 UTC
Created attachment 77400 [details] [review]
Bug 21137: Replace BORROWER_INFO with logged_in_user

it also removes 'category_type' and 'description' from a couple of
opac scripts, they are not needed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2018-08-01 19:28:18 UTC
Smuggled in a small follow-up - same pattern as patch on bug 19291.
Comment 15 Katrin Fischer 2018-08-01 19:29:07 UTC
Created attachment 77401 [details] [review]
Bug 21137: Replace USER_INFO with logged_in_user

This patch set does several things:
- it removes USER_INFO and BORROWER_INFO
These 2 variables contained logged-in patron's info. They must be
accessed from logged_in_user
- Use patron-title.inc for the breadcrumb at the OPAC, for consistencies

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2018-08-01 19:29:12 UTC
Created attachment 77402 [details] [review]
Bug 21137: use logged_in_user from opac-user.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2018-08-01 19:29:18 UTC
Created attachment 77403 [details] [review]
Bug 21137: Replace BORROWER_INFO with logged_in_user

it also removes 'category_type' and 'description' from a couple of
opac scripts, they are not needed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Katrin Fischer 2018-08-01 19:29:24 UTC
Created attachment 77404 [details] [review]
Bug 21137: Standardize breadcrumbs for tags page

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Nick Clemens (kidclamp) 2018-08-14 12:55:28 UTC
Awesome work all!

Pushed to master for 18.11
Comment 20 Martin Renvoize (ashimema) 2018-08-16 10:48:38 UTC
Enhancement, will not be backported to 18.05 x at this time.