From 0d1a46d57ed5bb1c6efa12b9c835659f17efc122 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 26 Jan 2024 17:35:38 +0000 Subject: [PATCH] Bug 14180: Add option to always load the issues table To test: 1. APPLY PATCH, updatedatebase, restart_all 2. Search for the system preference 'AlwaysLoadCheckoutsTable' and set it to 'Do'. 3. Go to 'circ/circulation.pl?borrowernumber=X' for a patron with checkouts. ( Check out tab ). 4. The table should load right away. 5. Go to 'members/moremember.pl?borrowernumber=X' for a patron with checkouts. ( Details tab ). 6. The table should load right way. 7. Set a value in the 'LoadCheckoutsTableDelay' system preference. 8. Back on 'circ/circulation.pl?borrowernumber=X', make sure the delay is honored. You should see a message like "Checkouts table will automatically load in X seconds". 9. The delay should NOT be honored on'members/moremember.pl?borrowernumber=X', that table should load right away/ 10. Turn off 'AlwaysLoadCheckoutsTable' and make sure the table does not load, or loads according to the cookie set when checking the 'Always show checkouts automatically' checkbox. Signed-off-by: Kelly Signed-off-by: Tomas Cohen Arazi Signed-off-by: Katrin Fischer --- .../prog/en/includes/checkouts-table.inc | 9 +-- .../admin/preferences/circulation.pref | 8 ++- .../prog/en/modules/circ/circulation.tt | 1 + .../prog/en/modules/members/moremember.tt | 3 +- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 62 +++++++++++-------- 5 files changed, 50 insertions(+), 33 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc index 8bae177e8f..d95ace2ac1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc @@ -7,7 +7,7 @@

Show checkouts [% SET LoadCheckoutsTableDelay = Koha.Preference('LoadCheckoutsTableDelay') %] - [% IF LoadCheckoutsTableDelay && page == 'circulation' %] + [% IF LoadCheckoutsTableDelay && patronpage == 'circ' %] Checkouts table will show automatically in [% LoadCheckoutsTableDelay | html %] seconds... @@ -46,9 +46,10 @@ [% INCLUDE 'checkouts-table-footer.inc' %] - - - + [% UNLESS Koha.Preference( 'AlwaysLoadCheckoutsTable' ) %] + + + [% END %]