Bugzilla – Attachment 151767 Details for
Bug 33845
Hold notes should show when viewing a patron's hold list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33845: Use table settings and hide note by default
Bug-33845-Use-table-settings-and-hide-note-by-defa.patch (text/plain), 5.24 KB, created by
Andrew Fuerste-Henry
on 2023-05-26 15:54:42 UTC
(
hide
)
Description:
Bug 33845: Use table settings and hide note by default
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2023-05-26 15:54:42 UTC
Size:
5.24 KB
patch
obsolete
>From 3aca86768206351c160d0029f24fb4d6c841ff94 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 26 May 2023 12:23:56 +0000 >Subject: [PATCH] Bug 33845: Use table settings and hide note by default > >This patch updates the holds table on circulation and moremembers to use >table settings and hides the note column by default to preserve existing views > >To test: > 1 - Apply patch > 2 - Enable system preferece 'OpacHoldNotes' > 3 - Place a hold on the opac and enter a note > 4 - Confirm it shows on the patron's page > 5 - View the patron in staff client > 6 - Ensure the holds note does not display on Holds tab in Checkout or Details view > 7 - Go to Admin->Table settings->Circulation > 8 - Under holds_table confirm 'notes' is hidden by default > 9 - Uncheck the box >10 - Refresh patron pages and confirm hold note shows > >Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> >--- > admin/columns_settings.yml | 32 +++++++++++++++++++ > .../prog/en/modules/circ/circulation.tt | 1 + > .../prog/en/modules/members/moremember.tt | 1 + > koha-tmpl/intranet-tmpl/prog/js/holds.js | 8 ++--- > 4 files changed, 38 insertions(+), 4 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index bbdf3d4213..83a1c56e95 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -1432,6 +1432,38 @@ modules: > columnname: phone > is_hidden: 1 > >+ holds_table: >+ columns: >+ - >+ columnname: reservedate >+ - >+ columnname: title >+ - >+ columnname: callnumber >+ - >+ columnname: itemtype >+ - >+ columnname: barcode >+ - >+ columnname: pickup_location >+ - >+ columnname: expirationdate >+ - >+ columnname: priority >+ - >+ columnname: notes >+ is_hidden: 1 >+ - >+ columnname: delete >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ - >+ columnname: suspend >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ - >+ columnname: status >+ > returns: > checkedintable: > columns: >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 2b3c2b0893..c07b04d278 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -1071,6 +1071,7 @@ > table_settings_issues_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %] > table_settings_relatives_issues_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'relatives-issues-table', 'json' ) | $raw %] > table_settings_borrowers_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %] >+ table_settings_holds_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'holds_table', 'json' ) | $raw %] > > [% IF borrowernumber and patron %] > if( Cookies.get("holdfor") != [% patron.borrowernumber | html %]){ >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 86eee74f5c..7569d40eb4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -923,6 +923,7 @@ > > table_settings_issues_table = [% TablesSettings.GetTableSettings( 'members', 'moremember', 'issues-table', 'json' ) | $raw %] > table_settings_relatives_issues_table = [% TablesSettings.GetTableSettings( 'members', 'moremember', 'relatives-issues-table', 'json' ) | $raw %] >+ table_settings_holds_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'holds_table', 'json' ) | $raw %] > > $(document).ready(function() { > $("#info_digests").tooltip(); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index 7cf0de410c..3daf05fa65 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -126,10 +126,10 @@ $(document).ready(function() { > var holds = new Array(); > if ( ! holdsTable ) { > var title; >- holdsTable = $("#holds-table").dataTable($.extend(true, {}, dataTablesDefaults, { >+ holdsTable = KohaTable("holds-table", { > "bAutoWidth": false, >- "sDom": "rt", >- "columns": [ >+ "dom": "rt", >+ "aoColumns": [ > { > "data": { _: "reservedate_formatted", "sort": "reservedate" } > }, >@@ -321,7 +321,7 @@ $(document).ready(function() { > d.borrowernumber = borrowernumber; > } > }, >- })); >+ }, table_settings_holds_table ); > > $('#holds-table').on( 'draw.dt', function () { > $(".hold-suspend").on( "click", function() { >-- >2.30.2
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 33845
:
151754
|
151755
|
151756
|
151757
|
151765
|
151766
|
151767
|
151768
|
152046
|
156416
|
156417
|
156418
|
156419
|
156420
|
156421
|
156692
|
156693
|
156694
|
156695
|
156696
|
156697