Bug 27324

Summary: Use Koha.Preference() for intranetbookbag everywhere
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: caroline.cyr-la-rose, dcook, fridolin.somers, jonathan.druart, martin.renvoize
Version: MainKeywords: Academy
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:
21.05.00
Bug Depends on: 26707, 27031    
Bug Blocks:    
Attachments: Bug 27324: Use Koha.Preference() for intranetbookbag everywhere
Bug 27324: Use Koha.Preference() for intranetbookbag everywhere
Bug 27324: (follow-up) Remove references to intranetbookbag from Auth.pm
Bug 27324: Use Koha.Preference() for intranetbookbag everywhere
Bug 27324: (follow-up) Remove references to intranetbookbag from Auth.pm

Description Katrin Fischer 2021-01-02 18:19:55 UTC
By using Koha.Preference() in the templates everywhere, we can remove the variable from Auth.pm in the end.

After bug 27031, it looks like the remaining instances are:

C4/Auth.pm:            intranetbookbag                                              => C4::Context->preference("intranetbookbag"),

koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt:                [% IF ( intranetbookbag ) %]
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt:                            [% IF ( intranetbookbag ) %]
koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc:[% IF ( virtualshelves && intranetbookbag ) %]
koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc:[% ELSIF ( intranetbookbag ) %]
Comment 1 David Cook 2021-01-03 23:34:28 UTC
Sounds good to me
Comment 2 Mazen Khallaf 2021-01-19 02:28:05 UTC
Created attachment 115287 [details] [review]
Bug 27324: Use Koha.Preference() for intranetbookbag everywhere

Test Plan:
1. Check the shelves and results page in the intranet
2. Apply the page
3. Check theres no change
Comment 3 Jonathan Druart 2021-01-19 09:02:24 UTC
We can then remove the 2 following occurrences:

C4/Auth.pm:            intranetbookbag                                                            => C4::Context->preference("intranetbookbag"),
C4/Auth.pm:        intranetbookbag                       => C4::Context->preference("intranetbookbag"),
Comment 4 Owen Leonard 2021-01-19 15:48:27 UTC
Created attachment 115336 [details] [review]
Bug 27324: Use Koha.Preference() for intranetbookbag everywhere

Test Plan:
1. Check the shelves and results page in the intranet
2. Apply the page
3. Check theres no change

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Owen Leonard 2021-01-19 15:48:31 UTC
Created attachment 115337 [details] [review]
Bug 27324: (follow-up) Remove references to intranetbookbag from Auth.pm

This patch removes references to intranetbookbag from Auth.pm. Now that
the templates use Koha.Preference("intranetbookbag") everywhere it is
unnecessary.
Comment 6 Martin Renvoize 2021-01-19 16:54:47 UTC
Created attachment 115339 [details] [review]
Bug 27324: Use Koha.Preference() for intranetbookbag everywhere

Test Plan:
1. Check the shelves and results page in the intranet
2. Apply the page
3. Check theres no change

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2021-01-19 16:54:50 UTC
Created attachment 115340 [details] [review]
Bug 27324: (follow-up) Remove references to intranetbookbag from Auth.pm

This patch removes references to intranetbookbag from Auth.pm. Now that
the templates use Koha.Preference("intranetbookbag") everywhere it is
unnecessary.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2021-01-19 16:55:34 UTC
Works as expected, no regressions.

Thanks for your contribution Mazen, welcome to Koha :)

Passing QA
Comment 9 Jonathan Druart 2021-01-20 12:51:17 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 10 Fridolin Somers 2021-01-25 14:12:41 UTC
Does not apply en 20.11.x because of Bug 26707

Not pushed to 20.11.x.
It is a small plumbing change so I think there is no need to create a rebased patch.