Bug 27324 - Use Koha.Preference() for intranetbookbag everywhere
Summary: Use Koha.Preference() for intranetbookbag everywhere
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords: Academy
Depends on: 26707 27031
Blocks:
  Show dependency treegraph
 
Reported: 2021-01-02 18:19 UTC by Katrin Fischer
Modified: 2022-06-06 20:24 UTC (History)
5 users (show)

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


Attachments
Bug 27324: Use Koha.Preference() for intranetbookbag everywhere (2.93 KB, patch)
2021-01-19 02:28 UTC, Mazen Khallaf
Details | Diff | Splinter Review
Bug 27324: Use Koha.Preference() for intranetbookbag everywhere (2.98 KB, patch)
2021-01-19 15:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27324: (follow-up) Remove references to intranetbookbag from Auth.pm (2.22 KB, patch)
2021-01-19 15:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27324: Use Koha.Preference() for intranetbookbag everywhere (3.04 KB, patch)
2021-01-19 16:54 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27324: (follow-up) Remove references to intranetbookbag from Auth.pm (2.33 KB, patch)
2021-01-19 16:54 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.