From 2f9db6cef910107fd89cf840c3371d6cd68264d7 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Mon, 15 Oct 2018 15:19:27 +0100 Subject: [PATCH] Bug 20563: (follow-up) Fix requested partners As per: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20563#c10 Thanks for the suggestion on merging the "Status" and "Additional status" columns, looks much better! --- Koha/Illrequest.pm | 2 +- .../prog/en/modules/ill/ill-requests.tt | 30 ++++++++-------------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index ae78a4dcbb..15d20ea6e3 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -996,7 +996,7 @@ sub _censor { my $partners_string = $illRequest->requested_partners; -Return the string representing the email addresses of the parters to +Return the string representing the email addresses of the partners to whom a request has been sent =cut diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt index adbe6f050a..32b8be91cd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -49,7 +49,6 @@ 'biblio_id', 'library', 'status', - 'additional_status', 'updated', 'illrequest_id', 'action' @@ -150,7 +149,15 @@ case "Requested": return _("Requested"); case "Requested from partners": - return _("Requested from partners"); + var statStr = _("Requested from partners"); + if ( + row.hasOwnProperty('requested_partners') && + row.requested_partners && + row.requested_partners.length > 0 + ) { + statStr += ' (' + row.requested_partners + ')'; + } + return statStr; case "Request reverted": return _("Request reverted"); case "Queued request": @@ -169,18 +176,6 @@ } }; - // Render function for additional status - var createAdditional = function(data, type, row) { - return ( - row.hasOwnProperty('requested_partners') && - row.requested_partners && - row.requested_partners.length > 0 - ) ? - "Requested from:
" + - row.requested_partners.replace('; ','
') : - ''; - }; - // Render function for creating a row's action link var createActionLink = function(data, type, row) { return 'Status: [% request.capabilities.$req_status.name | html %] [% IF request.requested_partners.length > 0 %] - ([% request.requested_partners %]) + ([% request.requested_partners | html %]) [% END %]
@@ -639,7 +630,6 @@ Bibliographic record ID Library Status - Additional status Updated on Request number -- 2.11.0