Bugzilla – Attachment 154035 Details for
Bug 34431
Distinguish between status and status alias in ILL UI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34431: Distinguish status from status_alias in filter dropdown
Bug-34431-Distinguish-status-from-statusalias-in-f.patch (text/plain), 2.63 KB, created by
Pedro Amorim
on 2023-07-28 10:23:55 UTC
(
hide
)
Description:
Bug 34431: Distinguish status from status_alias in filter dropdown
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-07-28 10:23:55 UTC
Size:
2.63 KB
patch
obsolete
>From 6c1383777b3f458729e2fc1619a4cf1cd0e5878d Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 28 Jul 2023 10:09:31 +0000 >Subject: [PATCH] Bug 34431: Distinguish status from status_alias in filter > dropdown > >Add a new optgroup in status dropdown >--- > .../prog/en/includes/ill-list-table-strings.inc | 1 + > koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js | 14 +++++++++++++- > 2 files changed, 14 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table-strings.inc >index f4327f40eb..201916b88c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table-strings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table-strings.inc >@@ -3,5 +3,6 @@ > var ill_manage = _("Manage request"); > var ill_manage_select_backend_first = _("Select a backend first"); > var ill_all_statuses = _("All statuses"); >+ var ill_status_aliases = _("Status aliases"); > </script> > <!-- / ill-list-table-strings.inc --> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >index 9419b0fa5d..2ec14a0930 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >@@ -437,7 +437,8 @@ $(document).ready(function() { > 'x-koha-embed': 'statuses+strings' > }, > success: function(response){ >- let statuses = response.statuses >+ let statuses = response.statuses.filter(status => status.type == 'ill_status'); >+ let status_aliases = response.statuses.filter(status => status.type == 'av'); > $('#illfilter_status').append( > '<option value="">'+ill_all_statuses+'</option>' > ); >@@ -447,6 +448,17 @@ $(document).ready(function() { > '">' + status.str + '</option>' > ); > }); >+ if (status_aliases.length !== 0) { >+ $('#illfilter_status').append( >+ '<optgroup id="status_aliases" label="' + ill_status_aliases +'"></optgroup>' >+ ); >+ status_aliases.sort((a, b) => a.str.localeCompare(b.str)).forEach(function (status_alias) { >+ $('#status_aliases').append( >+ '<option value="' + status_alias.code + >+ '">' + status_alias.str + '</option>' >+ ); >+ }); >+ } > } > }); > } >-- >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 34431
:
154034
|
154035
|
154036
|
154037
|
154289
|
154290
|
154291
|
154292
|
154301
|
154405
|
154406
|
154407
|
154408
|
154409
|
154410
|
154999
|
161104
|
161105
|
161106
|
161107
|
161108
|
161109
|
161110
|
161129
|
161130
|
161131
|
161132
|
161133
|
161134
|
161135