Bug 21137 - Replace BORROWER_INFO and USER_INFO with logged_in_user
Summary: Replace BORROWER_INFO and USER_INFO with logged_in_user
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 18403 19291
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-01 13:06 UTC by Jonathan Druart
Modified: 2020-06-16 12:19 UTC (History)
3 users (show)

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


Attachments
Bug 21137: Replace USER_INFO with logged_in_user (18.60 KB, patch)
2018-08-01 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21137: Replace BORROWER_INFO with logged_in_user (23.95 KB, patch)
2018-08-01 13:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21137: Replace USER_INFO with logged_in_user (18.60 KB, patch)
2018-08-01 14:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21137: use logged_in_user from opac-user.pl (7.36 KB, patch)
2018-08-01 14:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21137: Replace BORROWER_INFO with logged_in_user (24.30 KB, patch)
2018-08-01 14:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21137: Replace USER_INFO with logged_in_user (18.56 KB, patch)
2018-08-01 16:14 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 21137: use logged_in_user from opac-user.pl (7.40 KB, patch)
2018-08-01 16:14 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 21137: Replace BORROWER_INFO with logged_in_user (25.16 KB, patch)
2018-08-01 16:14 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19291: Make breadcrumbs for OPAC search history consistent with other patron account pages (1.77 KB, patch)
2018-08-01 19:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21137: Replace USER_INFO with logged_in_user (18.61 KB, patch)
2018-08-01 19:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21137: use logged_in_user from opac-user.pl (7.46 KB, patch)
2018-08-01 19:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21137: Replace BORROWER_INFO with logged_in_user (25.21 KB, patch)
2018-08-01 19:27 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21137: Replace USER_INFO with logged_in_user (18.61 KB, patch)
2018-08-01 19:29 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21137: use logged_in_user from opac-user.pl (7.46 KB, patch)
2018-08-01 19:29 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21137: Replace BORROWER_INFO with logged_in_user (25.21 KB, patch)
2018-08-01 19:29 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21137: Standardize breadcrumbs for tags page (1.08 KB, patch)
2018-08-01 19:29 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 2018-08-14 12:55:28 UTC
Awesome work all!

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