Bugzilla – Attachment 184947 Details for
Bug 40530
Show hold cancellation reason in patron holds history
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40530: Use +strings and simplify JS
Bug-40530-Use-strings-and-simplify-JS.patch (text/plain), 2.99 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-07-31 19:33:31 UTC
(
hide
)
Description:
Bug 40530: Use +strings and simplify JS
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-07-31 19:33:31 UTC
Size:
2.99 KB
patch
obsolete
>From 34a512ac74110127409d0357232e150c2a6bdcd9 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 29 Jul 2025 11:23:26 -0300 >Subject: [PATCH] Bug 40530: Use +strings and simplify JS > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../prog/en/modules/members/holdshistory.tt | 19 ++++--------------- > 1 file changed, 4 insertions(+), 15 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >index 8788dd154c0..87651575a19 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >@@ -165,19 +165,8 @@ > //Remove item type column settings > table_settings['columns'] = table_settings['columns'].filter(function(c){return c['columnname'] != 'itemtype';}); > [% END %] >- const hold_cancellation_reasons = {}; >- $.getJSON("/api/v1/authorised_value_categories/HOLD_CANCELLATION/authorised_values?_per_page=-1") >- .done(function(data) { >- // Convert the array into an associative array for ease of lookup >- data.forEach(function(item) { >- if (item.value !== undefined) { >- hold_cancellation_reasons[item.value] = item.description; >- } >- }); >- >- let current_holds_table = build_holds_table("#table_holdshistory"); >- let old_holds_table = build_holds_table("#table_oldholdshistory", 1); >- }); >+ let current_holds_table = build_holds_table("#table_holdshistory"); >+ let old_holds_table = build_holds_table("#table_oldholdshistory", 1); > function build_holds_table(table_id, old){ > let additional_filters = { > "-and": function(){ >@@ -214,7 +203,7 @@ > }; > > let table_url = '/api/v1/patrons/[% patron.borrowernumber | uri %]/holds'; >- let table_embeds = ['biblio', 'item', 'pickup_library', 'pickup_library.branchname']; >+ let table_embeds = ['+strings', 'biblio', 'item', 'pickup_library', 'pickup_library.branchname']; > if (old){ > table_url += '?old=1'; > table_embeds.push('deleted_biblio'); >@@ -331,7 +320,7 @@ > } else if (row.cancellation_date) { > let r = _("Cancelled"); > if (row.cancellation_reason){ >- r += " (%s)".format(hold_cancellation_reasons[row.cancellation_reason]); >+ r += " (%s)".format(row._strings.cancellation_reason.str); > } > return r; > } else if (row.status == 'W') { >-- >2.50.1
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 40530
:
184751
|
184753
|
184756
|
184761
|
184762
|
184812
|
184813
|
184814
|
184816
|
184817
|
184945
|
184946
| 184947