Bugzilla – Attachment 95624 Details for
Bug 21296
Suspend hold ignores system preference on intranet
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21296: suspend hold ignores system preference on intranet
Bug-21296-suspend-hold-ignores-system-preference-o.patch (text/plain), 5.67 KB, created by
Owen Leonard
on 2019-11-20 20:17:29 UTC
(
hide
)
Description:
Bug 21296: suspend hold ignores system preference on intranet
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2019-11-20 20:17:29 UTC
Size:
5.67 KB
patch
obsolete
>From af99c5696712ac398fd6d0260357b76f9605a087 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 20 Nov 2019 20:04:10 +0000 >Subject: [PATCH] Bug 21296: suspend hold ignores system preference on intranet > >This patch modifies the DataTable configuration for the table of holds >which displays under the "Holds" tab on the patron's checkout and >details pages. A variable is now defined in the JavaScript with the >value of the "SuspendHoldsIntranet" system preference. This variable is >passed to the DataTable configuration to determine whether the column is >visible or not. > >One of the changes made in this patch moves a <script> block so that it >appears before some of the JS includes on the page. This helps keep the >string-defining JS together in one block. > >To test, apply the patch and set the "SuspendHoldsIntranet" system >preference to "Allow." > > - Open the checkout page for a patron with one or more holds. > - Under the "Holds" tab, the table of holds should have a "Suspend" > column with controls for suspending or resuming holds. > - Check that the same is true on the patron detail page. > - Set the "SuspendHoldsIntranet" system preference to "Don't allow." > - Test the checkout and detail pages again and confirm that the > "Suspend" column does not appear. >--- > .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 14 ++++++++------ > .../intranet-tmpl/prog/en/modules/members/moremember.tt | 15 +++++++++------ > koha-tmpl/intranet-tmpl/prog/js/holds.js | 1 + > 3 files changed, 18 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 7c78ca77688..91f17ad60e4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -1021,11 +1021,7 @@ > [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %] > [% INCLUDE 'timepicker.inc' %] > [% Asset.js("lib/jquery/plugins/jquery.dataTables.rowGrouping.js") | $raw %] >- [% Asset.js("js/pages/circulation.js") | $raw %] >- [% Asset.js("js/checkouts.js") | $raw %] >- [% Asset.js("js/holds.js") | $raw %] >- [% Asset.js("js/circ-patron-search-results.js") | $raw %] >- <script type="text/javascript"> >+ <script> > /* Set some variable needed in circulation.js */ > var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; > var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]"; >@@ -1048,7 +1044,13 @@ > > var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); > var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone."); >- >+ var SuspendHoldsIntranet = [% ( Koha.Preference('SuspendHoldsIntranet') ) ? 1 : 0 | html %]; >+ </script> >+ [% Asset.js("js/pages/circulation.js") | $raw %] >+ [% Asset.js("js/checkouts.js") | $raw %] >+ [% Asset.js("js/holds.js") | $raw %] >+ [% Asset.js("js/circ-patron-search-results.js") | $raw %] >+ <script> > columns_settings_issues_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %] > columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index bf6dac9b8d1..0bd690f1425 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -852,12 +852,6 @@ > [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %] > [% INCLUDE 'timepicker.inc' %] > [% Asset.js("lib/jquery/plugins/jquery.dataTables.rowGrouping.js") | $raw %] >- [% Asset.js("js/pages/circulation.js") | $raw %] >- [% Asset.js("js/checkouts.js") | $raw %] >- [% Asset.js("js/holds.js") | $raw %] >- [% INCLUDE 'str/members-menu.inc' %] >- [% Asset.js("js/members-menu.js") | $raw %] >- [% Asset.js("js/messaging-preference-form.js") | $raw %] > <script> > /* Set some variable needed in circulation.js */ > var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; >@@ -880,6 +874,15 @@ > > var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); > var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone."); >+ var SuspendHoldsIntranet = [% ( Koha.Preference('SuspendHoldsIntranet') ) ? 1 : 0 | html %]; >+ </script> >+ [% Asset.js("js/pages/circulation.js") | $raw %] >+ [% Asset.js("js/checkouts.js") | $raw %] >+ [% Asset.js("js/holds.js") | $raw %] >+ [% INCLUDE 'str/members-menu.inc' %] >+ [% Asset.js("js/members-menu.js") | $raw %] >+ [% Asset.js("js/messaging-preference-form.js") | $raw %] >+ <script> > > columns_settings_issues_table = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) | $raw %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index 925b38b753f..41d47624e09 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -122,6 +122,7 @@ $(document).ready(function() { > }, > { > "bSortable": false, >+ "visible": SuspendHoldsIntranet, > "mDataProp": function( oObj ) { > holds[oObj.reserve_id] = oObj; //Store holds for later use > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21296
:
95624
|
97579
|
97590
|
100765